Merge branch 'prod' of bitbucket.org:bluetradesys/spark into prod
This commit is contained in:
commit
8ea18cb74a
202 files changed
+10324
-6128
No files matched your search
@@ -38,3 +38,6 @@ trace_data/
|
||||
.clangd/
|
||||
/.cache/
|
||||
.venv/**
|
||||
install/**
|
||||
.devcontainer/**
|
||||
/src/Spark.Admin.WebApp/src/bin/
|
||||
+7
-24
@@ -1,17 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(spark)
|
||||
|
||||
if (WIN32)
|
||||
set (platform "windows")
|
||||
else ()
|
||||
set (platform "linux")
|
||||
endif ()
|
||||
|
||||
set (EXTERNALS_ROOT "${CMAKE_SOURCE_DIR}/externals/${platform}")
|
||||
set (SPARK_PYTHON "${EXTERNALS_ROOT}/python")
|
||||
set (SPARK_BIN "${EXTERNALS_ROOT}/bin")
|
||||
set (SPARK_INCLUDE "${EXTERNALS_ROOT}/include")
|
||||
set (SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
|
||||
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
|
||||
|
||||
include_directories (BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
|
||||
link_directories (${SPARK_LIB})
|
||||
@@ -20,10 +10,12 @@ if (WIN32)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
||||
/MP \
|
||||
/WX /wd4251 /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 \
|
||||
/bigobj \
|
||||
/DCURL_STATICLIB \
|
||||
/D_WINSOCK_DEPRECATED_NO_WARNINGS \
|
||||
/D__TBB_NO_IMPLICIT_LINKAGE \
|
||||
/DBOOST_ALL_NO_LIB \
|
||||
/std:c++17 \
|
||||
/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600")
|
||||
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
@@ -32,23 +24,14 @@ if (WIN32)
|
||||
|
||||
add_subdirectory(src/lib)
|
||||
else ()
|
||||
# so that sparkd looks for libspark.so in its directory
|
||||
set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set (CMAKE_INSTALL_RPATH ".")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install/${CMAKE_BUILD_TYPE}/sparkd")
|
||||
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
|
||||
-fPIC -Wall -pedantic -Wextra -Werror \
|
||||
-Wno-missing-braces -Wno-ignored-qualifiers \
|
||||
--std=c++17 -fdiagnostics-color")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
|
||||
# so that sparkd looks for libspark.so in its directory
|
||||
add_subdirectory(src/server/sparkd)
|
||||
add_subdirectory(src/lib)
|
||||
# add_subdirectory(src/web)
|
||||
add_subdirectory(doc/user)
|
||||
add_subdirectory(src/sdk)
|
||||
if(BUILD_SDK)
|
||||
add_subdirectory(src/sdk)
|
||||
endif()
|
||||
add_subdirectory(src/data_files)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/server
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "sparkd",
|
||||
"hidden": true,
|
||||
"description": "Sparkd common config",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"generator": "Ninja",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_WITH_INSTALL_RPATH": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_CXX_STANDARD": "17",
|
||||
"CMAKE_EXE_LINKER_FLAGS": "-Wno-undef",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}",
|
||||
"CMAKE_INSTALL_RPATH": ".",
|
||||
"EXTERNALS_ROOT": "${sourceDir}/externals/linux",
|
||||
"SPARK_BIN": "${sourceDir}/externals/linux/bin",
|
||||
"SPARK_INCLUDE": "${sourceDir}/externals/linux/include"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sparkd-debug-clang",
|
||||
"displayName": "Debug (clang)",
|
||||
"description": "Debug build compiled w/ clang",
|
||||
"inherits": "sparkd",
|
||||
"binaryDir": "${sourceDir}/build/clang/debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-unused-but-set-variable -Wno-c++17-extensions --std=c++17 -fdiagnostics-color -DDEBUG",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"SPARK_LIB": "${sourceDir}/externals/linux/lib/Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sparkd-release-clang",
|
||||
"displayName": "Release (clang)",
|
||||
"description": "Release build compiled w/ clang",
|
||||
"binaryDir": "${sourceDir}/build/clang/release",
|
||||
"inherits": "sparkd",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-c++17-extensions --std=c++17 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3",
|
||||
"SPARK_LIB": "${sourceDir}/externals/linux/lib/Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sparkd-debug-gcc",
|
||||
"displayName": "Debug (gcc)",
|
||||
"description": "Debug build compiled w/ gcc",
|
||||
"inherits": "sparkd",
|
||||
"binaryDir": "${sourceDir}/build/gcc/debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-catch-value --std=c++17 -fdiagnostics-color -DDEBUG",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"SPARK_LIB": "${sourceDir}/externals/linux/lib/Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sparkd-release-gcc",
|
||||
"displayName": "Release (gcc)",
|
||||
"description": "Release build compiled w/ gcc",
|
||||
"inherits": "sparkd",
|
||||
"binaryDir": "${sourceDir}/build/gcc/release",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_C_COMPILER": "/usr/local/bin/gcc",
|
||||
"CMAKE_CXX_COMPILER": "/usr/local/bin/g++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers -Wno-deprecated-copy -Wno-catch-value --std=c++17 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3",
|
||||
"SPARK_LIB": "${sourceDir}/externals/linux/lib/Release"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "sparkd",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "sparkd-debug-clang",
|
||||
"configurePreset": "sparkd-debug-clang",
|
||||
"displayName": "Debug (clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
{
|
||||
"name": "sparkd-debug-gcc",
|
||||
"configurePreset": "sparkd-debug-gcc",
|
||||
"displayName": "Debug (gcc)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
{
|
||||
"name": "sparkd-release-clang",
|
||||
"configurePreset": "sparkd-release-clang",
|
||||
"displayName": "Release (clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
{
|
||||
"name": "sparkd-release-gcc",
|
||||
"configurePreset": "sparkd-release-gcc",
|
||||
"displayName": "Release (gcc)",
|
||||
"inherits": "sparkd"
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
-1
Submodule externals updated: 60a2edab69...e9120dabfe.
@@ -12,7 +12,6 @@ pycodestyle==2.7.0
|
||||
pycparser==2.20
|
||||
pylint==2.10.2
|
||||
PyMeta3==0.5.1
|
||||
termcolor==1.1.0
|
||||
toml==0.10.2
|
||||
wrapt==1.12.1
|
||||
yapf==0.31.0
|
||||
@@ -18,6 +18,7 @@ if (WIN32)
|
||||
domain_model/*.cpp
|
||||
expression/*.cpp
|
||||
logging/*.cpp
|
||||
io/*.cpp
|
||||
md/*.cpp
|
||||
os/*.cpp
|
||||
quickbus/*.cpp
|
||||
@@ -107,7 +108,11 @@ if (WIN32)
|
||||
libboost_date_time
|
||||
libboost_atomic
|
||||
libprotobuf
|
||||
)
|
||||
libprotoc
|
||||
libssl
|
||||
libcrypto
|
||||
crypt32
|
||||
)
|
||||
else ()
|
||||
target_link_libraries( libspark
|
||||
protobuf
|
||||
@@ -143,5 +148,3 @@ endif()
|
||||
if (WIN32)
|
||||
include(${CMAKE_SOURCE_DIR}/tools/vs_filters.cmake)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "lib/config/protos/system.pb.h"
|
||||
#include "lib/config/protos/Ports.pb.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <excpt.h>
|
||||
#endif
|
||||
|
||||
@@ -60,8 +60,8 @@ CAPI Quickbus* api_create_quickbus(const char* qbconfig, long length) {
|
||||
return new Quickbus(temp_conf);
|
||||
}
|
||||
|
||||
CAPI void api_destroy_quickbus(Quickbus* qbus) {
|
||||
#ifndef WIN32
|
||||
CAPI void api_destroy_quickbus(Quickbus *qbus) {
|
||||
#ifndef _WIN32
|
||||
if (qbus != nullptr) {
|
||||
delete qbus;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ protected:
|
||||
ResponseHeader header;
|
||||
header.set_code(ApiError::SUCCESS);
|
||||
header.set_request_id(request_id);
|
||||
int header_size = header.ByteSize() + 1;
|
||||
int body_size = response.ByteSize();
|
||||
int header_size = header.ByteSizeLong() + 1;
|
||||
int body_size = response.ByteSizeLong();
|
||||
int total_size = header_size + body_size;
|
||||
if (total_size <= 1024) {
|
||||
uint8_t buffer[1024];
|
||||
|
||||
@@ -40,11 +40,11 @@ public:
|
||||
header.set_request_id(++_id);
|
||||
auto ptoken = _context.token();
|
||||
if (ptoken) header.mutable_token()->CopyFrom(*ptoken);
|
||||
int header_size = header.ByteSize()+1;
|
||||
int header_size = header.ByteSizeLong()+1;
|
||||
assert(header_size < 128);
|
||||
|
||||
std::string request_buffer;
|
||||
request_buffer.reserve(header_size + request.ByteSize());
|
||||
request_buffer.reserve(header_size + request.ByteSizeLong());
|
||||
request_buffer += (char)(header_size);
|
||||
bool success = header.AppendToString(&request_buffer);
|
||||
success = success && request.AppendToString(&request_buffer);
|
||||
@@ -77,8 +77,8 @@ public:
|
||||
|
||||
|
||||
template <typename T>
|
||||
rxcpp::observable<RawUpdate<std::shared_ptr<const T>>> subscribe(int method_id, const char* method, const std::string& qualifier) {
|
||||
return rxcpp::observable<>::create<RawUpdate<std::shared_ptr<const T>>>([=](rxcpp::subscriber<RawUpdate<std::shared_ptr<const T>>> observer) {
|
||||
rxcpp::observable<RawUpdate<std::shared_ptr<T>>> subscribe(int method_id, const char* method, const std::string& qualifier) {
|
||||
return rxcpp::observable<>::create<RawUpdate<std::shared_ptr<T>>>([=](rxcpp::subscriber<RawUpdate<std::shared_ptr<T>>> observer) {
|
||||
StreamAccessRequest request;
|
||||
request.set_qualifier(qualifier);
|
||||
send<StreamAccessRequest,StreamAccessResponse>(method_id, request, [=](const Result<StreamAccessResponse>& response) {
|
||||
@@ -95,11 +95,12 @@ public:
|
||||
bool first_update = true;
|
||||
auto cb = [observer, first_update, qualifier](EventType event_type, const StreamUpdate* changes, int change_count) mutable {
|
||||
if (event_type == EventType::TABLE_UPDATED) {
|
||||
std::vector<std::shared_ptr<const T>> added_items, changed_items;
|
||||
std::vector<std::shared_ptr<T>> added_items, changed_items;
|
||||
std::vector<int> added_keys,
|
||||
changed_keys,
|
||||
removed_keys;
|
||||
for (size_t x = 0; x < change_count; ++x) {
|
||||
for (std::size_t x = 0;
|
||||
x < static_cast<std::size_t>(change_count); ++x) {
|
||||
const StreamUpdate& change = changes[x];
|
||||
switch(change.type) {
|
||||
case StreamUpdate::REMOVE:
|
||||
@@ -115,11 +116,11 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
observer.on_next(RawUpdate<std::shared_ptr<const T>>(added_items, added_keys, changed_items, changed_keys, removed_keys));
|
||||
observer.on_next(RawUpdate<std::shared_ptr<T>>(added_items, added_keys, changed_items, changed_keys, removed_keys));
|
||||
}
|
||||
else if (event_type == EventType::TABLE_CREATED) {
|
||||
if (!first_update) {
|
||||
observer.on_next(RawUpdate<std::shared_ptr<const T>>::Reset());
|
||||
observer.on_next(RawUpdate<std::shared_ptr<T>>::Reset());
|
||||
}
|
||||
first_update = false;
|
||||
}
|
||||
|
||||
+101
-92
@@ -1,112 +1,121 @@
|
||||
#pragma once
|
||||
|
||||
#include "RawUpdate.h"
|
||||
#include <rxcpp/rx.hpp>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <rxcpp/rx.hpp>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace bts {
|
||||
namespace api {
|
||||
|
||||
template <typename T>
|
||||
class Change {
|
||||
T _old, _new;
|
||||
public:
|
||||
Change(const T& old_value, const T& new_value) : _old(old_value), _new(new_value) { }
|
||||
const T& previous() const { return _old; }
|
||||
const T& current() const { return _new; }
|
||||
};
|
||||
template <typename T> class Change {
|
||||
T _old, _new;
|
||||
|
||||
template <typename T, typename TKey, typename ServiceType>
|
||||
struct Update {
|
||||
Update(std::vector<T>& all, std::vector<T>& added, std::vector<Change<T>> changed, std::vector<T>& removed) :
|
||||
_all_items(std::move(all)),
|
||||
_added_items(std::move(added)),
|
||||
public:
|
||||
Change(const T &old_value, const T &new_value)
|
||||
: _old(old_value), _new(new_value) {}
|
||||
const T &previous() const { return _old; }
|
||||
const T ¤t() const { return _new; }
|
||||
};
|
||||
|
||||
template <typename T, typename TKey, typename ServiceType> struct Update {
|
||||
Update(
|
||||
std::vector<T> &all,
|
||||
std::vector<T> &added,
|
||||
std::vector<Change<T>> changed,
|
||||
std::vector<T> &removed)
|
||||
: _all_items(std::move(all)), _added_items(std::move(added)),
|
||||
_changed_items(std::move(changed)),
|
||||
_removed_items(std::move(removed))
|
||||
{}
|
||||
_removed_items(std::move(removed)) {}
|
||||
|
||||
Update(const Update& other) : _all_items(other._all_items),
|
||||
_added_items(other._added_items),
|
||||
_changed_items(other._changed_items),
|
||||
_removed_items(other._removed_items)
|
||||
{}
|
||||
|
||||
Update(Update&& other) :
|
||||
_all_items(std::move(other._all_items)),
|
||||
Update(const Update &other)
|
||||
: _all_items(other._all_items), _added_items(other._added_items),
|
||||
_changed_items(other._changed_items),
|
||||
_removed_items(other._removed_items) {}
|
||||
|
||||
Update(Update &&other)
|
||||
: _all_items(std::move(other._all_items)),
|
||||
_added_items(std::move(other._added_items)),
|
||||
_changed_items(std::move(other._changed_items)),
|
||||
_removed_items(std::move(other._removed_items))
|
||||
{}
|
||||
_removed_items(std::move(other._removed_items)) {}
|
||||
|
||||
TKey key(const T& t) const { return ServiceType::key(t); }
|
||||
const std::vector<T>& all() const { return _all_items; }
|
||||
const std::vector<T>& added() const { return _added_items; }
|
||||
const std::vector<Change<T>>& changed() const { return _changed_items; }
|
||||
const std::vector<T>& removed() const { return _removed_items; }
|
||||
TKey key(const T &t) const { return ServiceType::key(t); }
|
||||
const std::vector<T> &all() const { return _all_items; }
|
||||
const std::vector<T> &added() const { return _added_items; }
|
||||
const std::vector<Change<T>> &changed() const { return _changed_items; }
|
||||
const std::vector<T> &removed() const { return _removed_items; }
|
||||
|
||||
private:
|
||||
std::vector<T> _all_items;
|
||||
std::vector<T> _added_items;
|
||||
std::vector<Change<T>> _changed_items;
|
||||
std::vector<T> _removed_items;
|
||||
private:
|
||||
std::vector<T> _all_items;
|
||||
std::vector<T> _added_items;
|
||||
std::vector<Change<T>> _changed_items;
|
||||
std::vector<T> _removed_items;
|
||||
};
|
||||
|
||||
template <typename T, typename TKey, typename ServiceType>
|
||||
std::function<rxcpp::observable<Update<T, TKey, ServiceType>>(
|
||||
const rxcpp::observable<RawUpdate<T>> &)>
|
||||
reconstitute() {
|
||||
return [](const rxcpp::observable<RawUpdate<T>> &inputi) {
|
||||
auto *input_ptr = const_cast<rxcpp::observable<RawUpdate<T>>*>(&inputi);
|
||||
auto &input = *input_ptr;
|
||||
auto state = std::make_shared<std::unordered_map<int, T>>();
|
||||
return input.map([state](const RawUpdate<T> &craw) {
|
||||
auto *raw_ptr = const_cast<RawUpdate<T>*>(&craw);
|
||||
RawUpdate<T> &raw = *raw_ptr;
|
||||
if (raw.is_reset) {
|
||||
std::vector<T> removed;
|
||||
removed.reserve(state->size());
|
||||
for (auto &t : *state) {
|
||||
removed.push_back(std::move(t.second));
|
||||
}
|
||||
state->clear();
|
||||
std::vector<T> all, added;
|
||||
std::vector<Change<T>> changed;
|
||||
return Update<T, TKey, ServiceType>(all, added, changed, removed);
|
||||
} else {
|
||||
//
|
||||
// Remove
|
||||
std::vector<T> removed;
|
||||
removed.reserve(raw.removed_keys.size());
|
||||
for (int key : raw.removed_keys) {
|
||||
auto iter = state->find(key);
|
||||
if (iter != state->end()) {
|
||||
removed.push_back(iter->second);
|
||||
state->erase(iter);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Add
|
||||
for (size_t x = 0; x < raw.added_keys.size(); ++x) {
|
||||
(*state)[raw.added_keys[x]] = raw.added_items[x];
|
||||
}
|
||||
//
|
||||
// Change
|
||||
std::vector<Change<T>> changed;
|
||||
changed.reserve(raw.changed_keys.size());
|
||||
for (size_t x = 0; x < raw.changed_keys.size(); ++x) {
|
||||
changed.push_back(Change<T>{
|
||||
(*state)[raw.changed_keys[x]], raw.changed_items[x]});
|
||||
(*state)[raw.changed_keys[x]] = raw.changed_items[x];
|
||||
}
|
||||
//
|
||||
// All
|
||||
std::vector<T> all;
|
||||
all.reserve(state->size());
|
||||
for (const auto &item : *state) {
|
||||
all.push_back(item.second);
|
||||
}
|
||||
|
||||
return Update<T, TKey, ServiceType>(
|
||||
all, raw.added_items, changed, removed);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T, typename TKey, typename ServiceType>
|
||||
std::function<rxcpp::observable<Update<T,TKey,ServiceType>>(const rxcpp::observable<RawUpdate<T>>&)> reconstitute() {
|
||||
return [](const rxcpp::observable<RawUpdate<T>>& input) {
|
||||
auto state = std::make_shared<std::unordered_map<int, T>>();
|
||||
return input.map([state](RawUpdate<T>& raw) {
|
||||
if (raw.is_reset) {
|
||||
std::vector<T> removed;
|
||||
removed.reserve(state->size());
|
||||
for (auto& t : *state) {
|
||||
removed.push_back(std::move(t.second));
|
||||
}
|
||||
state->clear();
|
||||
std::vector<T> all, added;
|
||||
std::vector<Change<T>> changed;
|
||||
return Update<T, TKey, ServiceType>(all, added, changed, removed);
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Remove
|
||||
std::vector<T> removed;
|
||||
removed.reserve(raw.removed_keys.size());
|
||||
for (int key : raw.removed_keys) {
|
||||
auto iter = state->find(key);
|
||||
if (iter != state->end()) {
|
||||
removed.push_back(iter->second);
|
||||
state->erase(iter);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Add
|
||||
for (size_t x = 0; x < raw.added_keys.size(); ++x) {
|
||||
(*state)[raw.added_keys[x]] = raw.added_items[x];
|
||||
}
|
||||
//
|
||||
// Change
|
||||
std::vector<Change<T>> changed;
|
||||
changed.reserve(raw.changed_keys.size());
|
||||
for (size_t x = 0; x < raw.changed_keys.size(); ++x) {
|
||||
changed.push_back(Change<T>{(*state)[raw.changed_keys[x]], raw.changed_items[x]});
|
||||
(*state)[raw.changed_keys[x]] = raw.changed_items[x];
|
||||
}
|
||||
//
|
||||
// All
|
||||
std::vector<T> all;
|
||||
all.reserve(state->size());
|
||||
for (const auto& item : *state) {
|
||||
all.push_back(item.second);
|
||||
}
|
||||
|
||||
return Update<T, TKey, ServiceType>(all, raw.added_items, changed, removed);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace bts
|
||||
|
||||
|
||||
}}//namespace
|
||||
@@ -19,12 +19,12 @@ using namespace rxcpp::operators;
|
||||
rxcpp::observable<{{cap name}}Update> {{../name}}::subscribe_{{name}}(std::string const&qualifier) {
|
||||
return
|
||||
_pchannel->subscribe<{{output_type_cpp}}>({{@index}}, "{{name}}", qualifier)
|
||||
| (bts::api::reconstitute<std::shared_ptr<const {{output_type_cpp}}>,const {{key_type.cpptype}}, {{../name}}>());
|
||||
| (bts::api::reconstitute<std::shared_ptr<{{output_type_cpp}}>,const {{key_type.cpptype}}, {{../name}}>());
|
||||
}
|
||||
rxcpp::observable<{{cap name}}Update> {{../name}}::subscribe_{{name}}() {
|
||||
return
|
||||
_pchannel->subscribe<{{output_type_cpp}}>({{@index}}, "{{name}}", "")
|
||||
| (bts::api::reconstitute<std::shared_ptr<const {{output_type_cpp}}>,const {{key_type.cpptype}}, {{../name}}>());
|
||||
| (bts::api::reconstitute<std::shared_ptr<{{output_type_cpp}}>,const {{key_type.cpptype}}, {{../name}}>());
|
||||
}
|
||||
|
||||
{{#if key_type.natural_key}}
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
#include "lib/api/public/Update.h"
|
||||
#include "lib/utils/bts_export.h"
|
||||
|
||||
#include <rxcpp/rx.hpp>
|
||||
#include <string>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <functional>
|
||||
#include <future>
|
||||
#include <memory>
|
||||
#include <rxcpp/rx.hpp>
|
||||
#include <string>
|
||||
|
||||
{{ns-open package}}
|
||||
|
||||
@@ -22,7 +23,7 @@ class {{name}};
|
||||
{{#each service}}
|
||||
{{#each method}}{{#if server_streaming}}
|
||||
class {{../name}};
|
||||
typedef bts::api::Update<std::shared_ptr<const {{output_type_cpp}}>, const {{key_type.cpptype}}, {{../name}}> {{cap name}}Update;
|
||||
typedef bts::api::Update<std::shared_ptr<{{output_type_cpp}}>, const {{key_type.cpptype}}, {{../name}}> {{cap name}}Update;
|
||||
{{/if}}{{/each}}
|
||||
|
||||
// {{comment}}
|
||||
|
||||
@@ -63,7 +63,7 @@ void Authenticated{{name}}Base::dispatch(const bts::api::RequestHeader& header,
|
||||
response.set_request_id(header.request_id());
|
||||
response.set_code(bts::api::ApiError::MISSING_METHOD);
|
||||
uint8_t buffer[64];
|
||||
int header_size = response.ByteSize() + 1;
|
||||
int header_size = response.ByteSizeLong() + 1;
|
||||
serialize(header_size, response, buffer);
|
||||
on_response(buffer, header_size);
|
||||
} break;
|
||||
@@ -128,7 +128,7 @@ void Authenticated{{name}}Base::dispatch(const bts::api::RequestHeader& header,
|
||||
{{else}}
|
||||
update.key = get_key({{name}}_key(item));
|
||||
{{/if}}
|
||||
update.buffer_len = item.ByteSize();
|
||||
update.buffer_len = item.ByteSizeLong();
|
||||
char* buffer = new char[update.buffer_len];
|
||||
item.SerializePartialToArray(buffer, update.buffer_len);
|
||||
update.buffer =buffer;
|
||||
@@ -143,7 +143,7 @@ void Authenticated{{name}}Base::dispatch(const bts::api::RequestHeader& header,
|
||||
{{else}}
|
||||
update.key = get_key({{name}}_key(item));
|
||||
{{/if}}
|
||||
update.buffer_len = item.ByteSize();
|
||||
update.buffer_len = item.ByteSizeLong();
|
||||
char* buffer = new char[update.buffer_len];
|
||||
item.SerializePartialToArray(buffer, update.buffer_len);
|
||||
update.buffer =buffer;
|
||||
|
||||
@@ -268,23 +268,27 @@ message MomentumAlgoLog {
|
||||
uint64 ask_top_quantity = 8;
|
||||
}
|
||||
message MomentumAlgoParamsFile {
|
||||
bool Edge_Target = 1;
|
||||
bool Edge_Loss = 2;
|
||||
bool Reverse_Logic = 3;
|
||||
bool File_Sim = 4;
|
||||
bool Timed_Start = 5;
|
||||
bool Log_Graph = 6;
|
||||
bool Open_Position_On_Close = 7;
|
||||
uint32 Renko_Ticks = 8;
|
||||
uint32 Gan_Buffer_Size = 9;
|
||||
uint32 Edge_To_Capture = 10;
|
||||
uint32 Edge_To_lose = 11;
|
||||
uint32 Time_Start_Hours_24_HRS = 12;
|
||||
uint32 Time_Start_Minutes = 13;
|
||||
uint32 Date_Start_Day_of_Month = 14;
|
||||
uint32 Date_Start_Month_0_12 = 15;
|
||||
uint32 Date_Start_Year_20XX = 16;
|
||||
double Run_Duration_Hours_decimal = 17;
|
||||
bool edge_target = 1;
|
||||
bool edge_loss = 2;
|
||||
bool reverse_logic = 3;
|
||||
bool file_sim = 4;
|
||||
bool timed_start = 5;
|
||||
bool log_graph = 6;
|
||||
bool open_position_on_close = 7;
|
||||
bool early_brick = 8;
|
||||
bool use_hull_avg = 9;
|
||||
uint32 renko_ticks = 10;
|
||||
uint32 upr_gan_buffer_size = 11;
|
||||
uint32 lwr_gan_buffer_size = 12;
|
||||
uint32 edge_to_capture = 13;
|
||||
uint32 edge_to_lose = 14;
|
||||
double early_threshold = 15;
|
||||
uint32 time_start_hours_24_hrs = 16;
|
||||
uint32 time_start_minutes = 17;
|
||||
uint32 date_start_day_of_month = 18;
|
||||
uint32 date_start_month_0_12 = 19;
|
||||
uint32 date_start_year_20xx = 20;
|
||||
double run_duration_hours_decimal = 21;
|
||||
}
|
||||
// message MomentumAlgoResult {
|
||||
// // google.protobuf.Timestamp time = 3;
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
#define URDL_DISALE_SSL 1
|
||||
#include <urdl/url.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "lib/config_defaults.h"
|
||||
#include "lib/config_proto_files.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Winsock2.h>
|
||||
#include <d2d1.h>
|
||||
#else
|
||||
@@ -39,9 +42,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include "lib/config_proto_files.h"
|
||||
#include "lib/config_defaults.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace bts {
|
||||
@@ -51,7 +51,6 @@ namespace internal {
|
||||
const char* MESSAGE_STRING_RULE = "rule";
|
||||
const char* MESSAGE_STRING_VALUE = "value";
|
||||
const char* MESSAGE_STRING_INCLUDE = "include";
|
||||
const char* MESSAGE_STRING_INCLUDE_BACKUP = "fallback";
|
||||
const char* MESSAGE_STRING_MACRO_TYPE = "MacroType";
|
||||
const char* MESSAGE_STRING_MACRO = "macro";
|
||||
|
||||
@@ -89,13 +88,10 @@ std::string get_command_argument(const char* key)
|
||||
if (boost::iequals(*begin, key))
|
||||
{
|
||||
begin++;
|
||||
if (begin == end) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
os::setenv(CONFIG_SERVER_ENV_VAR, begin->c_str());
|
||||
if (begin != end) {
|
||||
return *begin;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@@ -115,13 +111,19 @@ string ConfigurationState::settings_path()
|
||||
return os::sparkdata_path("conf");
|
||||
}
|
||||
|
||||
void ConfigurationState::initialize_defaults(IConfigLog& log)
|
||||
{
|
||||
void ConfigurationState::initialize_defaults(IConfigLog &log) {
|
||||
initialize_defaults(
|
||||
log,
|
||||
{std::string("lib/config/protos/"), std::string("lib/api/domain/")});
|
||||
}
|
||||
|
||||
void ConfigurationState::initialize_defaults(
|
||||
IConfigLog &log, const std::vector<std::string> &proto_dirs) {
|
||||
std::lock_guard<std::recursive_mutex> lock(_initialization_mutex);
|
||||
if (_is_initialized) return;
|
||||
|
||||
generate_all_config_proto(log);
|
||||
|
||||
generate_all_config_proto(log, proto_dirs);
|
||||
|
||||
std::shared_ptr<proto::Message> new_message(_prototype->New());
|
||||
ErrorsOnlyLog elog(log);
|
||||
|
||||
@@ -349,14 +351,25 @@ void ConfigurationState::initialize_settings()
|
||||
initialize_defaults(log);
|
||||
|
||||
std::string settings = settings_path();
|
||||
std::string fallback = get_command_argument("-ConfigFallback");
|
||||
bts_assert_msg(!settings.empty(), "Failed to determine config path");
|
||||
os::setenv(CONFIG_SERVER_ENV_VAR, settings.c_str());
|
||||
|
||||
DEFER(// Do this even if load() fails
|
||||
initialize_builtins();
|
||||
initialize_macros();
|
||||
_deferred_queue->process();
|
||||
);
|
||||
load(settings, fallback, log);
|
||||
{
|
||||
DEFER( // Do this even if load() fails
|
||||
initialize_builtins(); initialize_macros();
|
||||
_deferred_queue->process(););
|
||||
load(settings, log);
|
||||
}
|
||||
|
||||
std::vector<std::string> descs;
|
||||
std::vector<std::shared_ptr<proto::Message>>::iterator iter;
|
||||
for (iter = _config_chain.begin(); iter != _config_chain.end(); ++iter) {
|
||||
const proto::Message &imsg = **iter;
|
||||
descs.push_back(imsg.DebugString());
|
||||
}
|
||||
std::string config_desc =
|
||||
fmt::to_string(fmt::join(descs, "\n***********************\n"));
|
||||
log.info(fmt::format("initialized config:\n{}", config_desc));
|
||||
}
|
||||
|
||||
void ConfigurationState::reset()
|
||||
@@ -375,41 +388,26 @@ void ConfigurationState::reset()
|
||||
_port = 80;
|
||||
}
|
||||
|
||||
int ConfigurationState::load(const std::string& url, const std::string& fallback_url, IConfigLog& log)
|
||||
{
|
||||
int ConfigurationState::load(const std::string &url, IConfigLog &log) {
|
||||
std::shared_ptr<proto::Message> new_message(_prototype->New());
|
||||
|
||||
bool loaded = false;
|
||||
try {
|
||||
loaded = load_message(url, *new_message.get(), log, *_deferred_queue.get());
|
||||
}
|
||||
catch(ServerUnreachableException&) {
|
||||
if (fallback_url.empty()) {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
loaded = load_message(url, *new_message.get(), log, *_deferred_queue.get());
|
||||
|
||||
if (!loaded && !fallback_url.empty())
|
||||
{
|
||||
std::string message = "Failed to load: " + url + " using fallback.";
|
||||
log.warning(message);
|
||||
loaded = load_message(fallback_url, *new_message.get(), log, *_deferred_queue.get());
|
||||
if (_host.empty() || _host == "localhost") { tie(_host, _port) = hostname(fallback_url); }
|
||||
if (_host.empty() || _host == "localhost") {
|
||||
tie(_host, _port) = hostname(url);
|
||||
}
|
||||
if (_host.empty() || _host == "localhost") { tie(_host, _port) = hostname(url); }
|
||||
if (!loaded) return 0;
|
||||
|
||||
if (!loaded)
|
||||
return 0;
|
||||
|
||||
std::string include = get_include(*new_message.get());
|
||||
std::string fallback = get_fallback(*new_message.get());
|
||||
|
||||
// insert at front?
|
||||
_config_chain.push_back(new_message);
|
||||
|
||||
// Recursively load includes
|
||||
if (!include.empty())
|
||||
{
|
||||
return 1 + load(include, fallback, log);
|
||||
if (!include.empty()) {
|
||||
return 1 + load(include, log);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -426,14 +424,12 @@ int ConfigurationState::load_string(const std::string& values, bool print_errors
|
||||
parse_stream("test string", input_stream, *new_message.get(), log, *_deferred_queue.get());
|
||||
|
||||
std::string include = get_include(*new_message.get());
|
||||
std::string fallback = get_fallback(*new_message.get());
|
||||
|
||||
_config_chain.push_back(new_message);
|
||||
|
||||
int count = 0;
|
||||
if (!include.empty())
|
||||
{
|
||||
count += load(include, fallback, log);
|
||||
if (!include.empty()) {
|
||||
count += load(include, log);
|
||||
}
|
||||
|
||||
if (_host.empty()) {
|
||||
@@ -477,10 +473,11 @@ void ConfigurationState::add_metadata_field(proto::FileDescriptorProto* file_dp,
|
||||
}
|
||||
|
||||
// Construct a new Message that describes the save file format
|
||||
// This can then be used with google::protobuf::TextFormat to load and save files
|
||||
void ConfigurationState::generate_all_config_proto(IConfigLog& log)
|
||||
{
|
||||
const char* bts_config_classname = "__BTSConfig";
|
||||
// This can then be used with google::protobuf::TextFormat to load and save
|
||||
// files
|
||||
void ConfigurationState::generate_all_config_proto(
|
||||
IConfigLog &log, const std::vector<std::string> &proto_dirs) {
|
||||
const char *bts_config_classname = "__BTSConfig";
|
||||
int field_number = 0;
|
||||
|
||||
proto::FileDescriptorProto bts_config_dp;
|
||||
@@ -495,13 +492,6 @@ void ConfigurationState::generate_all_config_proto(IConfigLog& log)
|
||||
include_field->set_type(proto::FieldDescriptorProto_Type_TYPE_STRING);
|
||||
include_field->set_label(proto::FieldDescriptorProto_Label_LABEL_OPTIONAL);
|
||||
|
||||
// Add the 'fallback' field
|
||||
proto::FieldDescriptorProto* backup_field = config_message->add_field();
|
||||
backup_field->set_name(MESSAGE_STRING_INCLUDE_BACKUP);
|
||||
backup_field->set_number(++field_number);
|
||||
backup_field->set_type(proto::FieldDescriptorProto_Type_TYPE_STRING);
|
||||
backup_field->set_label(proto::FieldDescriptorProto_Label_LABEL_OPTIONAL);
|
||||
|
||||
// Add 'macro' message type
|
||||
proto::DescriptorProto* macro_message = bts_config_dp.add_message_type();
|
||||
macro_message->set_name(MESSAGE_STRING_MACRO_TYPE);
|
||||
@@ -526,23 +516,29 @@ void ConfigurationState::generate_all_config_proto(IConfigLog& log)
|
||||
|
||||
// add a meta type and field for each generated message
|
||||
proto::DescriptorPool::generated_pool();
|
||||
for (size_t x = 0; x < BTS_ARRAYSIZE(config_proto_files); x++)
|
||||
{
|
||||
std::string proto_path = "lib/config/protos/";
|
||||
proto_path += config_proto_files[x];
|
||||
const proto::FileDescriptor* file_desc = proto::DescriptorPool::generated_pool()->FindFileByName(proto_path);
|
||||
if (file_desc != nullptr)
|
||||
{
|
||||
|
||||
auto find_proto_file = [&proto_dirs](const std::string &name) -> const proto::FileDescriptor * {
|
||||
for (const auto &proto_dir : proto_dirs) {
|
||||
const auto * res = proto::DescriptorPool::generated_pool()->FindFileByName(
|
||||
proto_dir + name);
|
||||
if (res != nullptr) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
for (size_t x = 0; x < BTS_ARRAYSIZE(config_proto_files); x++) {
|
||||
const auto *file_desc = find_proto_file(config_proto_files[x]);
|
||||
if (file_desc != nullptr) {
|
||||
bts_config_dp.add_dependency(file_desc->name());
|
||||
for (int y=0; y < file_desc->message_type_count(); y++)
|
||||
{
|
||||
const proto::Descriptor* message_desc = file_desc->message_type(y);
|
||||
add_metadata_field(&bts_config_dp, config_message, message_desc, ++field_number);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef WIN32
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
// on linux the linker might throw away config protos that
|
||||
// are not used in sparkd. On windows we build a dll so that
|
||||
// should not happen
|
||||
@@ -903,10 +899,6 @@ std::string get_include(const proto::Message& message)
|
||||
return get_field(message, MESSAGE_STRING_INCLUDE);
|
||||
}
|
||||
|
||||
std::string get_fallback(const proto::Message& message)
|
||||
{
|
||||
return get_field(message, MESSAGE_STRING_INCLUDE_BACKUP);
|
||||
}
|
||||
|
||||
}}}//end namespaces
|
||||
|
||||
} // namespace internal
|
||||
} // namespace config
|
||||
} // namespace bts
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef CONFIGURATIONSTATE_H_
|
||||
#define CONFIGURATIONSTATE_H_
|
||||
|
||||
@@ -51,9 +52,10 @@ namespace internal {
|
||||
~ConfigurationState(void);
|
||||
|
||||
void initialize_defaults(IConfigLog& log);
|
||||
void initialize_defaults(IConfigLog &log, const std::vector<std::string> &proto_dirs);
|
||||
void initialize_settings();
|
||||
|
||||
int load(const std::string& url, const std::string& fallback, IConfigLog&);
|
||||
int load(const std::string& url, IConfigLog&);
|
||||
int load_string(const std::string& values, bool print_errors=false);
|
||||
void reset();
|
||||
|
||||
@@ -78,7 +80,7 @@ namespace internal {
|
||||
void initialize_macros();
|
||||
void add_macro(const proto::Message*);
|
||||
void add_metadata_field(proto::FileDescriptorProto* file_dp, proto::DescriptorProto* message_dp, const proto::Descriptor* base_field, int index);
|
||||
void generate_all_config_proto(IConfigLog&);
|
||||
void generate_all_config_proto(IConfigLog&, const std::vector<std::string> &proto_dirs);
|
||||
const proto::Message* try_get_value(const std::string& field_name, const proto::Message& message) const;
|
||||
|
||||
std::string settings_path();
|
||||
|
||||
@@ -66,7 +66,10 @@ message CustomFormatIceSecurities{
|
||||
message IgnoreNansInDayPnL {
|
||||
optional bool enabled = 1 [default = true];
|
||||
}
|
||||
|
||||
message SendLimitOrderForPositionFlattener {
|
||||
optional bool enabled = 1 [default = true];
|
||||
optional uint32 quantity = 2 [default = 0];
|
||||
}
|
||||
message DynamicAlgos{
|
||||
optional bool enable_dorman = 1 [default = false];
|
||||
optional bool enable_pyramid = 2 [default = false];
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <bits/stdint-uintn.h>
|
||||
#endif
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "OutFIX.h"
|
||||
|
||||
namespace bts {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "AsyncReader.h"
|
||||
|
||||
#include "IConnection.h"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "IConnection.h"
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
namespace bts {
|
||||
namespace trace {struct CorID;}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "JetFIXGateway.h"
|
||||
|
||||
namespace bts {
|
||||
|
||||
@@ -6,20 +6,21 @@
|
||||
#include <array>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
|
||||
namespace bts {
|
||||
namespace log {
|
||||
|
||||
struct Level {
|
||||
using Rep = uint8_t;
|
||||
constexpr static auto Max = std::numeric_limits<Rep>::max();
|
||||
constexpr static auto Max = (std::numeric_limits<Rep>::max)();
|
||||
Rep ordinal;
|
||||
bool operator<(const Level &rhs) const {return ordinal < rhs.ordinal;}
|
||||
};
|
||||
|
||||
struct Subsystem {
|
||||
using Rep = uint8_t;
|
||||
constexpr static auto Max = std::numeric_limits<Rep>::max();
|
||||
constexpr static auto Max = (std::numeric_limits<Rep>::max)();
|
||||
Rep ordinal;
|
||||
bool operator<(const Subsystem &rhs) const {return ordinal < rhs.ordinal;}
|
||||
};
|
||||
|
||||
@@ -35,8 +35,8 @@ struct LogRec {
|
||||
};
|
||||
GCC_DIAG_RESTORE()
|
||||
|
||||
#ifndef WIN32
|
||||
//static_assert(sizeof(LogRec) == 256, "LogRec should be 128 bytes");
|
||||
#ifndef _WIN32
|
||||
// static_assert(sizeof(LogRec) == 256, "LogRec should be 128 bytes");
|
||||
#endif
|
||||
|
||||
}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "LogRec.h"
|
||||
#include "lib/os/os.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <numeric>
|
||||
|
||||
@@ -14,7 +14,7 @@ std::string format_tuple(const char*msg_template, Tuple const &t,std::index_sequ
|
||||
try {
|
||||
return fmt::format(msg_template,std::get<Is>(t)...);
|
||||
}
|
||||
catch (fmt::FormatError const &e)
|
||||
catch (fmt::format_error const &e)
|
||||
{
|
||||
return fmt::format("Bad log message template: '{}' Error: '{}'",
|
||||
msg_template,e.what());
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace log {
|
||||
|
||||
struct InitSysLog {
|
||||
InitSysLog() {
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
openlog("spark", 0, LOG_USER);
|
||||
#endif
|
||||
}
|
||||
@@ -61,7 +61,7 @@ Sink console_sink(LoggingConfig const &cfg) {
|
||||
}
|
||||
|
||||
Sink syslog_sink(LoggingConfig const &cfg) {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
return null_sink();
|
||||
#else
|
||||
auto f = formatter(cfg);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <atomic>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <google/btree/btree_set.h>
|
||||
#include <btree/set.h>
|
||||
#endif
|
||||
#include <tbb/concurrent_hash_map.h>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
@@ -45,9 +45,6 @@ void print_pool_stats(const utils::ConcurrentPool<MBOSnapshot>& pool) {
|
||||
|
||||
std::sort(bid_sz.begin(), bid_sz.end());
|
||||
std::sort(ask_sz.begin(), ask_sz.end());
|
||||
size_t bid_tot =0, ask_tot = 0;
|
||||
for(size_t i : bid_sz) { bid_tot += i; }
|
||||
for(size_t i : ask_sz) { ask_tot += i; }
|
||||
|
||||
std::stringstream bid_percentiles, ask_percentiles;
|
||||
for (double x : { 0.5, 0.75, 0.9, 0.95, 0.99 }) {
|
||||
@@ -123,8 +120,8 @@ struct MBOProcessorImpl {
|
||||
// after draining publish the set in small batches
|
||||
// re-check input queue regularly
|
||||
|
||||
btree::btree_set<MBOWorkingState*> dirty;
|
||||
std::vector<MBOWorkingState*> clean;
|
||||
btree::set<MBOWorkingState *> dirty;
|
||||
std::vector<MBOWorkingState *> clean;
|
||||
|
||||
while(running) {
|
||||
Incremental temp;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "ExchangeOrderKey.h"
|
||||
#include "MDProducerHandle.h"
|
||||
|
||||
#include "google/btree/btree_map.h"
|
||||
#include <btree/map.h>
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
@@ -107,8 +107,8 @@ struct MBOWorkingState {
|
||||
// Used for 'change' messages which update price
|
||||
std::unordered_map<ExchangeOrderKey, key_t> orderid_index;
|
||||
|
||||
btree::btree_map<key_t,Data,LessBid> bid;
|
||||
btree::btree_map<key_t,Data> ask;
|
||||
btree::map<key_t, Data, LessBid> bid;
|
||||
btree::map<key_t, Data> ask;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
#include "lib/config/protos/MarketData.pb.h"
|
||||
#include "lib/utils/sane_algorithm.h"
|
||||
|
||||
#include <tbb/queuing_mutex.h>
|
||||
#include <google/btree/btree_map.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <btree/map.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <tbb/queuing_mutex.h>
|
||||
#include <tuple>
|
||||
|
||||
using namespace std;
|
||||
using namespace bts::api;
|
||||
using namespace btree;
|
||||
// using namespace btree;
|
||||
namespace bts {
|
||||
namespace md {
|
||||
|
||||
@@ -160,8 +160,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
btree_map<security_key, tuple<const ColdEntry*,const void*>> search_handles(const std::set<security_key>& keys) {
|
||||
btree_map<security_key, tuple<const ColdEntry*, const void*>> result;
|
||||
btree::map<security_key, tuple<const ColdEntry *, const void *>>
|
||||
search_handles(const std::set<security_key> &keys) {
|
||||
btree::map<security_key, tuple<const ColdEntry *, const void *>> result;
|
||||
// Walk hot and cold lists and fill in any found handles
|
||||
if (!_cold.is_initialized()) return result;
|
||||
_cold.all_entries([&](const ColdEntry& entry) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "MDConsumerHandle.h"
|
||||
#include "MBOProcessor.h"
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/os/os.h"
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#define never bts_assert(false)
|
||||
@@ -11,6 +12,7 @@ using small_vector = boost::container::small_vector<T,4>;
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
using os::memset;
|
||||
|
||||
MDConsumerHandle::MDConsumerHandle() {
|
||||
memset(this, 0, sizeof(MDConsumerHandle));
|
||||
@@ -387,7 +389,7 @@ std::unique_ptr<MBOSnapshot,std::function<void(MBOSnapshot*)>> MDConsumerHandle:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}}//namespace
|
||||
|
||||
} // namespace md
|
||||
} // namespace bts
|
||||
|
||||
#endif
|
||||
+15
-19
@@ -1,6 +1,7 @@
|
||||
#ifndef NO_CPP0X
|
||||
#include "MDProducer.h"
|
||||
|
||||
#include "lib/os/os.h"
|
||||
#include "lib/utils/SharedList.h"
|
||||
#include "lib/utils/WaitFreeQueue.h"
|
||||
#include "Shm/MDStructure.h"
|
||||
@@ -11,7 +12,7 @@ using namespace std;
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
|
||||
using os::memcpy;
|
||||
|
||||
// Owns shared memory for a single symbol+type
|
||||
class MDProducerImpl {
|
||||
@@ -109,23 +110,17 @@ private:
|
||||
// MDProducer
|
||||
//
|
||||
|
||||
MDProducer::MDProducer(Platform platform, MDProducerFlags flags) :
|
||||
_mutex(new std::mutex()),
|
||||
_producers(),
|
||||
_id_recorder(),
|
||||
_platform(platform),
|
||||
_flags(flags),
|
||||
_smapper(flags & MDProducerFlags::SecurityMapper)
|
||||
{ }
|
||||
#ifndef WIN32
|
||||
MDProducer::MDProducer(Platform platform, SecurityIDRecorder recorder, MDProducerFlags flags) :
|
||||
_mutex(new std::mutex()),
|
||||
_producers(),
|
||||
_id_recorder(std::make_unique<SecurityIDRecorder>(recorder)),
|
||||
_platform(platform),
|
||||
_flags(flags),
|
||||
_smapper(flags & MDProducerFlags::SecurityMapper)
|
||||
{ }
|
||||
MDProducer::MDProducer(Platform platform, MDProducerFlags flags)
|
||||
: _mutex(new std::mutex()), _producers(), _id_recorder(),
|
||||
_platform(platform), _flags(flags),
|
||||
_smapper(flags & MDProducerFlags::SecurityMapper) {}
|
||||
#ifndef _WIN32
|
||||
MDProducer::MDProducer(
|
||||
Platform platform, SecurityIDRecorder recorder, MDProducerFlags flags)
|
||||
: _mutex(new std::mutex()), _producers(),
|
||||
_id_recorder(std::make_unique<SecurityIDRecorder>(recorder)),
|
||||
_platform(platform), _flags(flags),
|
||||
_smapper(flags & MDProducerFlags::SecurityMapper) {}
|
||||
#endif
|
||||
MDProducer::MDProducer(MDProducer&& other) :
|
||||
_mutex(std::move(other._mutex)),
|
||||
@@ -195,6 +190,7 @@ void MDProducerChannel::add_trade(const co2::TradeMessage& trade) {_me->add_trad
|
||||
void MDProducerChannel::add_rfq(const co2::QuoteRequestMessage& rfq) {_me->add_rfq(rfq);}
|
||||
void MDProducerChannel::gap() { _me->gap(); }
|
||||
|
||||
}}//namespace
|
||||
} // namespace md
|
||||
} // namespace bts
|
||||
|
||||
#endif
|
||||
@@ -3,17 +3,17 @@
|
||||
#include "lib/utils/Dispatcher.h"
|
||||
#include "lib/utils/LockBox.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <google/btree/btree_map.h>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
#include <btree/map.h>
|
||||
#include <mutex>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
|
||||
struct SecurityCacheImpl {
|
||||
utils::LockBox<btree::btree_map<SecurityKey, SecurityPtr>> cache;
|
||||
utils::LockBox<btree::btree_map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
|
||||
utils::LockBox<btree::map<SecurityKey, SecurityPtr>> cache;
|
||||
utils::LockBox<btree::map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
|
||||
tbb::concurrent_queue<SecurityPtr> update_queue;
|
||||
void enqueue_update_db(const SecurityPtr&);
|
||||
void flush();
|
||||
@@ -44,8 +44,8 @@ void SecurityCacheImpl::flush() {
|
||||
SecurityCache::SecurityCache() : _me(std::make_shared<SecurityCacheImpl>()) {}
|
||||
SecurityCache::~SecurityCache() {}
|
||||
|
||||
const Security* SecurityCache::try_get_security(SecurityKey key) const {
|
||||
return _me->cache.lock([key](btree::btree_map<SecurityKey, SecurityPtr>& t) {
|
||||
const Security *SecurityCache::try_get_security(SecurityKey key) const {
|
||||
return _me->cache.lock([key](btree::map<SecurityKey, SecurityPtr> &t) {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
return iter->second.get();
|
||||
@@ -53,14 +53,15 @@ const Security* SecurityCache::try_get_security(SecurityKey key) const {
|
||||
return (const api::Security*)nullptr;
|
||||
});
|
||||
}
|
||||
const Security* SecurityCache::try_get_security(ExchangeSecurityKey key) const {
|
||||
return _me->ex_cache.lock([key](btree::btree_map<ExchangeSecurityKey,SecurityPtr>& t) {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
return iter->second.get();
|
||||
}
|
||||
return (const api::Security*)nullptr;
|
||||
});
|
||||
const Security *SecurityCache::try_get_security(ExchangeSecurityKey key) const {
|
||||
return _me->ex_cache.lock(
|
||||
[key](btree::map<ExchangeSecurityKey, SecurityPtr> &t) {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
return iter->second.get();
|
||||
}
|
||||
return (const api::Security *)nullptr;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "SecurityDB.h"
|
||||
#ifndef WIN32
|
||||
#include "lib/logging/logging.h"
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <SQLiteCpp/SQLiteCpp.h>
|
||||
#include <sqlite/sqlite3.h>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#ifndef WIN32
|
||||
#include "lib/domain_model/Security.h"
|
||||
#ifndef _WIN32
|
||||
#include "SecurityIDRecorder.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "MDProducerHandle.h"
|
||||
#include "common.h"
|
||||
#include "MDProducerHandle.h"
|
||||
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/utils/parse_enum.h"
|
||||
#ifndef _WIN32
|
||||
#include "google/btree/btree_map.h"
|
||||
#include <btree/map.h>
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
struct DisplayFactorMapper : public ISecurityMapper
|
||||
{
|
||||
btree::btree_map<UserSymbol, int> _mapped;
|
||||
namespace bts {
|
||||
namespace md {
|
||||
struct DisplayFactorMapper : public ISecurityMapper {
|
||||
btree::map<UserSymbol, int> _mapped;
|
||||
DisplayFactorMapper() : _mapped() {
|
||||
for (const auto& ov : config::get<DisplayFactorOverride>().override()) {
|
||||
if (ov.has_price_multiplier()) {
|
||||
@@ -50,10 +49,9 @@ struct DisplayFactorMapper : public ISecurityMapper
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct CppOverride : public ISecurityMapper
|
||||
{
|
||||
btree::btree_map<std::string, double> _map;
|
||||
|
||||
struct CppOverride : public ISecurityMapper {
|
||||
btree::map<std::string, double> _map;
|
||||
CppOverride() : _map() {
|
||||
for (const auto& p : config::get<config::CppConfig>().cpp_entry()) {
|
||||
_map.insert(p);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "SettlementRecorder.h"
|
||||
#include "lib/utils/Sqlite_utils.h"
|
||||
#include "lib/config/config.h"
|
||||
|
||||
@@ -163,7 +163,7 @@ class FixedSyntheticSecurity : public FixedSecurity
|
||||
public:
|
||||
FixedSyntheticSecurity(const api::Security& sec) :
|
||||
_leg_count(sec.synthetic().legs_size()),
|
||||
_buffer_size(sec.ByteSize())
|
||||
_buffer_size(sec.ByteSizeLong())
|
||||
{
|
||||
type = api::SECURITYTYPE_SYNTHETIC;
|
||||
sec.SerializeToArray(buffer(), _buffer_size);
|
||||
@@ -260,7 +260,7 @@ void with_security(SecurityType type, size_t leg_count, const api::Security* psy
|
||||
// We could optimize this by using a fixed size stack buffer and only heap allocating if we exceed that
|
||||
// but in general FixedSynthetic is not performance sensitive
|
||||
std::vector<uint8_t> buffer;
|
||||
buffer.resize(psynthetic->ByteSize() + sizeof(FixedSyntheticSecurity));
|
||||
buffer.resize(psynthetic->ByteSizeLong() + sizeof(FixedSyntheticSecurity));
|
||||
auto* psec = new (&buffer[0]) FixedSyntheticSecurity(*psynthetic);
|
||||
cb(*psec);
|
||||
return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
#include "SyntheticSecurityService.h"
|
||||
|
||||
#include "lib/config/config.h"
|
||||
|
||||
@@ -510,7 +510,7 @@ struct MDRelayServer : bts::co2::AuthenticatedMarketDataRelayBase {
|
||||
#ifndef _WIN32
|
||||
auto elapsed = (TimeStamp::now() - start);
|
||||
_time->observe(elapsed.milliseconds());
|
||||
_size->observe(preply->ByteSize());
|
||||
_size->observe(preply->ByteSizeLong());
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ const uint32_t recorder_version = 3;
|
||||
|
||||
template <class T>
|
||||
void writebuf(ofstream& out, const T& pb) {
|
||||
uint32_t size = pb.ByteSize();
|
||||
auto size = static_cast<std::uint32_t>(pb.ByteSizeLong());
|
||||
out.write(reinterpret_cast<char*>(&size), sizeof(size));
|
||||
bts_assert(pb.SerializeToOstream(&out));
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#define _DISABLE_EXTENDED_ALIGNED_STORAGE
|
||||
#include "Co2TestInstrument.h"
|
||||
#include "lib/md/MemorySegmentUtils.h"
|
||||
#include "lib/os/os.h"
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
using os::memcpy;
|
||||
|
||||
#ifdef _WIN32
|
||||
# pragma warning (push)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "../IntPrice.h"
|
||||
#include "../MBOProcessor.h"
|
||||
#include "Co2TestInstrument.h"
|
||||
#include "lib/utils/Shuffle.h"
|
||||
|
||||
#include <random>
|
||||
#include <algorithm>
|
||||
@@ -54,7 +55,7 @@ std::vector<inc::Update> gen_test_orders(uint64_t id=100, inc::UpdateType type=i
|
||||
// std::cout << std::endl << order_id.value() << ": " << price.price() << "-" << size;
|
||||
}
|
||||
}
|
||||
std::random_shuffle(result.begin(), result.end());
|
||||
utils::Shuffle::shuffle(result.begin(), result.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -105,7 +106,7 @@ TEST_CASE("MBO incremental", "[md][mbo]") {
|
||||
concat( gen_test_orders(128, inc::UpdateType::Bid),
|
||||
gen_test_orders(256, inc::UpdateType::Ask));
|
||||
|
||||
std::random_shuffle(orders.begin(), orders.end());
|
||||
utils::Shuffle::shuffle(orders.begin(), orders.end());
|
||||
apply_incremental(state, orders);
|
||||
|
||||
REQUIRE(state.bid.size() + state.ask.size() == orders.size());
|
||||
@@ -188,7 +189,8 @@ TEST_CASE("MBO sort order", "[md][mbo]") {
|
||||
});
|
||||
}
|
||||
}
|
||||
std::random_shuffle(updates.begin(), updates.end());
|
||||
std::random_device rd;
|
||||
std::shuffle(updates.begin(), updates.end(), std::mt19937(rd()));
|
||||
|
||||
apply_incremental(state, updates);
|
||||
|
||||
@@ -316,5 +318,7 @@ TEST_CASE("MBO change price and size", "[md][mbo]") {
|
||||
REQUIRE(!not_ask);
|
||||
}
|
||||
|
||||
}}}
|
||||
#endif
|
||||
} // namespace test
|
||||
} // namespace md
|
||||
} // namespace bts
|
||||
#endif
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
#include "lib/utils/defer.h"
|
||||
#include "lib/utils/warn_ctrl.h"
|
||||
#include "lib/utils/Shuffle.h"
|
||||
|
||||
#include "lib/config/protos/MarketData.pb.h"
|
||||
#include "lib/utils/Sqlite_utils.h"
|
||||
@@ -155,7 +156,7 @@ class Co2Tests {
|
||||
"}");
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
void test_security_id_recorder(const std::string &db_name) {
|
||||
// Verify callbacks happen after work complete
|
||||
auto db1 = sqlite::open_db(db_name.c_str());
|
||||
@@ -1010,7 +1011,7 @@ class Co2Tests {
|
||||
REQUIRE(security_count == 5);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
void test_settlement_recorder() {
|
||||
using namespace datetime;
|
||||
security_key k1 = 401, k2 = 402;
|
||||
@@ -1109,7 +1110,7 @@ TEST_CASE("CO2Tests", "[md]") {
|
||||
|
||||
co2_tests->setup();
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
SECTION("test_security_id_recorder") {
|
||||
co2_tests->test_security_id_recorder(":memory:");
|
||||
co2_tests->test_security_id_recorder("file::memory:?cache=shared");
|
||||
@@ -1148,7 +1149,7 @@ TEST_CASE("CO2Tests", "[md]") {
|
||||
SECTION("test_retry_unresolved_spread") {
|
||||
co2_tests->test_retry_unresolved_spread();
|
||||
}
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
SECTION("test_settlement_recorder") {
|
||||
co2_tests->test_settlement_recorder();
|
||||
}
|
||||
@@ -1217,7 +1218,7 @@ struct Co2IndexTests {
|
||||
|
||||
template <class Index> void test_random_search(Index &index) {
|
||||
vector<uint64_t> temp(random_ids);
|
||||
std::random_shuffle(temp.begin(), temp.end());
|
||||
utils::Shuffle::shuffle(temp.begin(), temp.end());
|
||||
for (auto &id : temp) {
|
||||
if (used_ids.find(id) != used_ids.end()) {
|
||||
REQUIRE(index.has_security(id));
|
||||
|
||||
Vendored
+3
-2
@@ -1,5 +1,6 @@
|
||||
#ifndef WIN32
|
||||
#include "OnixsUtils.h"
|
||||
#ifndef _WIN32
|
||||
#include "OnixsUtils.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/logging/logging.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/config/protos/MarketData.pb.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <boost/container/small_vector.hpp>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace bts {
|
||||
@@ -27,7 +28,7 @@ struct NoKey {
|
||||
// (late join) or reentrancy (unsub while handling an update).
|
||||
template <typename EV, typename KE = KeyExtractor> class ContentSubscription {
|
||||
public:
|
||||
using Key = decltype((*((KE *)nullptr))(*((EV *)nullptr)));
|
||||
using Key = std::invoke_result_t<KE, const EV&>;
|
||||
using CB = std::function<void(const EV &)>;
|
||||
struct SubID {
|
||||
SubID() : k(), sid(0) {}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include "lib/mercury/synopsis/ISynopsisBuilder.h"
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace bts {
|
||||
namespace mercury {
|
||||
@@ -11,7 +12,7 @@ namespace mercury {
|
||||
// published for each key
|
||||
template <class EV> class MergeByKey : public ISynopsisBuilder {
|
||||
public:
|
||||
using RefConstKey = decltype(((EV *)nullptr)->key());
|
||||
using RefConstKey = std::invoke_result_t<decltype(&EV::key), EV>;
|
||||
using ConstKey = typename std::remove_reference<RefConstKey>::type;
|
||||
|
||||
using Key = typename std::remove_const<ConstKey>::type;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "lib/utils/PBUtils.h"
|
||||
#include "lib/api/service_helpers/PositionUtilities.h"
|
||||
#include <future>
|
||||
#include <optional>
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
#include "lib/orderman/orderman_utils/CancelReject.h"
|
||||
#include "lib/orderman/orderman_utils/fix_order_codec.h"
|
||||
#include "lib/orderman/orderman_utils/orderman_common.h"
|
||||
#include "lib/os/os.h"
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
namespace ilink3 {
|
||||
using os::strncpy;
|
||||
|
||||
IL3Parser::IL3Parser(config::JetFIX::Connection const *cfg, IL3SecDB *db)
|
||||
: most_recent_account(), cfg(cfg), db(db) {}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#include "lib/md/SecurityOracle.h"
|
||||
#include "lib/md/ExchangeSecurityKey.h"
|
||||
#include <boost/pool/object_pool.hpp>
|
||||
#include <google/btree/btree_map.h>
|
||||
#include <btree/map.h>
|
||||
#include <optional>
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
|
||||
@@ -186,7 +186,7 @@ constexpr bool has_error(int events) {
|
||||
}
|
||||
|
||||
void IL3Reactor::do_work() {
|
||||
std::array<epoll_event, 100> ev_list;
|
||||
std::array<epoll_event, 100> ev_list{};
|
||||
auto ready = epoll_wait(me->epoll_fd, ev_list.data(), ev_list.size(), 0);
|
||||
if (ready == -1) {
|
||||
if (errno == EINTR) return;
|
||||
|
||||
@@ -162,9 +162,9 @@ map_cust_cti(api::orderman::CTICode code) {
|
||||
case CTI_CODE_CTI_CODE1:
|
||||
return CustOrderCapacity::Membertradingfortheirownaccount;
|
||||
case CTI_CODE_CTI_CODE2:
|
||||
return CustOrderCapacity::Clearingfirmtradingforitsproprietaryaccount;
|
||||
return CustOrderCapacity::Memberfirmtradingforitsproprietaryaccount;
|
||||
case CTI_CODE_CTI_CODE3:
|
||||
return CustOrderCapacity::Membertradingforanothermember;
|
||||
return CustOrderCapacity::Membertradingforanothermemberornonmember;
|
||||
case CTI_CODE_CTI_CODE4:
|
||||
return CustOrderCapacity::Allother;
|
||||
default:
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_AVGPXIND_H_
|
||||
#define _ILINKBINARY_AVGPXIND_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class AvgPxInd
|
||||
@@ -127,8 +63,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, AvgPxInd::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, AvgPxInd::Value m)
|
||||
{
|
||||
return os << AvgPxInd::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_BOOLEANFLAG_H_
|
||||
#define _ILINKBINARY_BOOLEANFLAG_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class BooleanFlag
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, BooleanFlag::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, BooleanFlag::Value m)
|
||||
{
|
||||
return os << BooleanFlag::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_BOOLEANNULL_H_
|
||||
#define _ILINKBINARY_BOOLEANNULL_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class BooleanNULL
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, BooleanNULL::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, BooleanNULL::Value m)
|
||||
{
|
||||
return os << BooleanNULL::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(330);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(521);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = BusinessReject521(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
BusinessReject521 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
BusinessReject521 &putText(const std::string& str)
|
||||
BusinessReject521 &putText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
BusinessReject521 &putSenderID(const std::string& str)
|
||||
BusinessReject521 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1293,7 +1300,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
BusinessReject521 &putLocation(const std::string& str)
|
||||
BusinessReject521 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -1724,7 +1731,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
BusinessReject521 &putRefMsgType(const std::string& str)
|
||||
BusinessReject521 &putRefMsgType(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -1932,11 +1939,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, BusinessReject521 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, BusinessReject521 _writer)
|
||||
{
|
||||
BusinessReject521 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
BusinessReject521 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "BusinessReject521", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_CLEARINGACCTTYPE_H_
|
||||
#define _ILINKBINARY_CLEARINGACCTTYPE_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ClearingAcctType
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ClearingAcctType::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ClearingAcctType::Value m)
|
||||
{
|
||||
return os << ClearingAcctType::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_CMTAGIVEUPCD_H_
|
||||
#define _ILINKBINARY_CMTAGIVEUPCD_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CmtaGiveUpCD
|
||||
@@ -96,7 +32,7 @@ public:
|
||||
{
|
||||
GiveUp = static_cast<char>(71),
|
||||
SGXoffset = static_cast<char>(83),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
NULL_VALUE = static_cast<char>(0x00)
|
||||
};
|
||||
|
||||
static CmtaGiveUpCD::Value get(const char value)
|
||||
@@ -105,7 +41,7 @@ public:
|
||||
{
|
||||
case static_cast<char>(71): return GiveUp;
|
||||
case static_cast<char>(83): return SGXoffset;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
case static_cast<char>(0x00): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]");
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, CmtaGiveUpCD::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, CmtaGiveUpCD::Value m)
|
||||
{
|
||||
return os << CmtaGiveUpCD::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_CUSTORDHANDLINST_H_
|
||||
#define _ILINKBINARY_CUSTORDHANDLINST_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CustOrdHandlInst
|
||||
@@ -100,7 +36,7 @@ public:
|
||||
AlgoEngine = static_cast<char>(72),
|
||||
DeskElectronic = static_cast<char>(87),
|
||||
ClientElectronic = static_cast<char>(89),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
NULL_VALUE = static_cast<char>(48)
|
||||
};
|
||||
|
||||
static CustOrdHandlInst::Value get(const char value)
|
||||
@@ -113,7 +49,7 @@ public:
|
||||
case static_cast<char>(72): return AlgoEngine;
|
||||
case static_cast<char>(87): return DeskElectronic;
|
||||
case static_cast<char>(89): return ClientElectronic;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
case static_cast<char>(48): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]");
|
||||
@@ -136,8 +72,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, CustOrdHandlInst::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, CustOrdHandlInst::Value m)
|
||||
{
|
||||
return os << CustOrdHandlInst::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_CUSTORDERCAPACITY_H_
|
||||
#define _ILINKBINARY_CUSTORDERCAPACITY_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CustOrderCapacity
|
||||
@@ -95,8 +31,8 @@ public:
|
||||
enum Value
|
||||
{
|
||||
Membertradingfortheirownaccount = static_cast<std::uint8_t>(1),
|
||||
Clearingfirmtradingforitsproprietaryaccount = static_cast<std::uint8_t>(2),
|
||||
Membertradingforanothermember = static_cast<std::uint8_t>(3),
|
||||
Memberfirmtradingforitsproprietaryaccount = static_cast<std::uint8_t>(2),
|
||||
Membertradingforanothermemberornonmember = static_cast<std::uint8_t>(3),
|
||||
Allother = static_cast<std::uint8_t>(4),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
@@ -106,8 +42,8 @@ public:
|
||||
switch (value)
|
||||
{
|
||||
case static_cast<std::uint8_t>(1): return Membertradingfortheirownaccount;
|
||||
case static_cast<std::uint8_t>(2): return Clearingfirmtradingforitsproprietaryaccount;
|
||||
case static_cast<std::uint8_t>(3): return Membertradingforanothermember;
|
||||
case static_cast<std::uint8_t>(2): return Memberfirmtradingforitsproprietaryaccount;
|
||||
case static_cast<std::uint8_t>(3): return Membertradingforanothermemberornonmember;
|
||||
case static_cast<std::uint8_t>(4): return Allother;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
@@ -120,8 +56,8 @@ public:
|
||||
switch (value)
|
||||
{
|
||||
case Membertradingfortheirownaccount: return "Membertradingfortheirownaccount";
|
||||
case Clearingfirmtradingforitsproprietaryaccount: return "Clearingfirmtradingforitsproprietaryaccount";
|
||||
case Membertradingforanothermember: return "Membertradingforanothermember";
|
||||
case Memberfirmtradingforitsproprietaryaccount: return "Memberfirmtradingforitsproprietaryaccount";
|
||||
case Membertradingforanothermemberornonmember: return "Membertradingforanothermemberornonmember";
|
||||
case Allother: return "Allother";
|
||||
case NULL_VALUE: return "NULL_VALUE";
|
||||
}
|
||||
@@ -130,8 +66,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, CustOrderCapacity::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, CustOrderCapacity::Value m)
|
||||
{
|
||||
return os << CustOrderCapacity::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
@@ -324,8 +324,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, DATA writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, DATA writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("length": )";
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_DKREASON_H_
|
||||
#define _ILINKBINARY_DKREASON_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class DKReason
|
||||
@@ -102,7 +38,7 @@ public:
|
||||
CalculationDifference = static_cast<char>(70),
|
||||
NoMatchingExecutionReport = static_cast<char>(71),
|
||||
Other = static_cast<char>(90),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
NULL_VALUE = static_cast<char>(48)
|
||||
};
|
||||
|
||||
static DKReason::Value get(const char value)
|
||||
@@ -117,7 +53,7 @@ public:
|
||||
case static_cast<char>(70): return CalculationDifference;
|
||||
case static_cast<char>(71): return NoMatchingExecutionReport;
|
||||
case static_cast<char>(90): return Other;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
case static_cast<char>(48): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum DKReason [E103]");
|
||||
@@ -142,8 +78,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, DKReason::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, DKReason::Value m)
|
||||
{
|
||||
return os << DKReason::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
@@ -338,8 +338,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, Decimal32NULL writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, Decimal32NULL writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return 6;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT
|
||||
@@ -255,6 +255,11 @@ public:
|
||||
|
||||
SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 6)
|
||||
{
|
||||
return INT64_C(9223372036854775807);
|
||||
}
|
||||
|
||||
std::int64_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t));
|
||||
return SBE_LITTLE_ENDIAN_ENCODE_64(val);
|
||||
@@ -283,7 +288,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return 6;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT
|
||||
@@ -325,6 +330,11 @@ public:
|
||||
|
||||
SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 6)
|
||||
{
|
||||
return static_cast<std::int8_t>(127);
|
||||
}
|
||||
|
||||
std::int8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int8_t));
|
||||
return (val);
|
||||
@@ -338,8 +348,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, Decimal64NULL writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, Decimal64NULL writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(132);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(503);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = Establish503(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
Establish503 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -651,7 +658,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putHMACSignature(const std::string& str)
|
||||
Establish503 &putHMACSignature(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 32)
|
||||
@@ -857,7 +864,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putAccessKeyID(const std::string& str)
|
||||
Establish503 &putAccessKeyID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1063,7 +1070,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putTradingSystemName(const std::string& str)
|
||||
Establish503 &putTradingSystemName(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 30)
|
||||
@@ -1269,7 +1276,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putTradingSystemVersion(const std::string& str)
|
||||
Establish503 &putTradingSystemVersion(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
@@ -1475,7 +1482,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putTradingSystemVendor(const std::string& str)
|
||||
Establish503 &putTradingSystemVendor(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
@@ -1909,7 +1916,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putSession(const std::string& str)
|
||||
Establish503 &putSession(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 3)
|
||||
@@ -2115,7 +2122,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Establish503 &putFirm(const std::string& str)
|
||||
Establish503 &putFirm(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -2367,7 +2374,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
Establish503 &putCredentials(const std::string& str)
|
||||
Establish503 &putCredentials(const std::string &str)
|
||||
{
|
||||
if (str.length() > 65534)
|
||||
{
|
||||
@@ -2388,11 +2395,16 @@ public:
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, Establish503 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, Establish503 _writer)
|
||||
{
|
||||
Establish503 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
Establish503 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "Establish503", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(38);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(504);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = EstablishmentAck504(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
EstablishmentAck504 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -962,11 +969,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, EstablishmentAck504 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, EstablishmentAck504 _writer)
|
||||
{
|
||||
EstablishmentAck504 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
EstablishmentAck504 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "EstablishmentAck504", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(72);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(505);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = EstablishmentReject505(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
EstablishmentReject505 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -526,7 +533,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
EstablishmentReject505 &putReason(const std::string& str)
|
||||
EstablishmentReject505 &putReason(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 48)
|
||||
@@ -955,11 +962,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, EstablishmentReject505 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, EstablishmentReject505 _writer)
|
||||
{
|
||||
EstablishmentReject505 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
EstablishmentReject505 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "EstablishmentReject505", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_EXECACKSTATUS_H_
|
||||
#define _ILINKBINARY_EXECACKSTATUS_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecAckStatus
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ExecAckStatus::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ExecAckStatus::Value m)
|
||||
{
|
||||
return os << ExecAckStatus::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
ExecInst &clear()
|
||||
@@ -433,8 +433,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecInst writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecInst writer)
|
||||
{
|
||||
builder << '[';
|
||||
bool atLeastOne = false;
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_EXECMODE_H_
|
||||
#define _ILINKBINARY_EXECMODE_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecMode
|
||||
@@ -96,7 +32,7 @@ public:
|
||||
{
|
||||
Aggressive = static_cast<char>(65),
|
||||
Passive = static_cast<char>(80),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
NULL_VALUE = static_cast<char>(0x00)
|
||||
};
|
||||
|
||||
static ExecMode::Value get(const char value)
|
||||
@@ -105,7 +41,7 @@ public:
|
||||
{
|
||||
case static_cast<char>(65): return Aggressive;
|
||||
case static_cast<char>(80): return Passive;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
case static_cast<char>(0x00): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExecMode [E103]");
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ExecMode::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ExecMode::Value m)
|
||||
{
|
||||
return os << ExecMode::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_EXECREASON_H_
|
||||
#define _ILINKBINARY_EXECREASON_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecReason
|
||||
@@ -103,6 +39,9 @@ public:
|
||||
CancelFromRiskManagementAPI = static_cast<std::uint8_t>(106),
|
||||
SelfMatchPreventionNewestOrderCancelled = static_cast<std::uint8_t>(107),
|
||||
Cancelduetovolquotedoptionorderrestedqtylessthanminordersize = static_cast<std::uint8_t>(108),
|
||||
CancelRFCOrder = static_cast<std::uint8_t>(109),
|
||||
CancelUponContractExpiration = static_cast<std::uint8_t>(110),
|
||||
SystemCancel = static_cast<std::uint8_t>(111),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
@@ -119,6 +58,9 @@ public:
|
||||
case static_cast<std::uint8_t>(106): return CancelFromRiskManagementAPI;
|
||||
case static_cast<std::uint8_t>(107): return SelfMatchPreventionNewestOrderCancelled;
|
||||
case static_cast<std::uint8_t>(108): return Cancelduetovolquotedoptionorderrestedqtylessthanminordersize;
|
||||
case static_cast<std::uint8_t>(109): return CancelRFCOrder;
|
||||
case static_cast<std::uint8_t>(110): return CancelUponContractExpiration;
|
||||
case static_cast<std::uint8_t>(111): return SystemCancel;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
@@ -138,6 +80,9 @@ public:
|
||||
case CancelFromRiskManagementAPI: return "CancelFromRiskManagementAPI";
|
||||
case SelfMatchPreventionNewestOrderCancelled: return "SelfMatchPreventionNewestOrderCancelled";
|
||||
case Cancelduetovolquotedoptionorderrestedqtylessthanminordersize: return "Cancelduetovolquotedoptionorderrestedqtylessthanminordersize";
|
||||
case CancelRFCOrder: return "CancelRFCOrder";
|
||||
case CancelUponContractExpiration: return "CancelUponContractExpiration";
|
||||
case SystemCancel: return "SystemCancel";
|
||||
case NULL_VALUE: return "NULL_VALUE";
|
||||
}
|
||||
|
||||
@@ -145,8 +90,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ExecReason::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ExecReason::Value m)
|
||||
{
|
||||
return os << ExecReason::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_EXECTYPTRDCXL_H_
|
||||
#define _ILINKBINARY_EXECTYPTRDCXL_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecTypTrdCxl
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ExecTypTrdCxl::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ExecTypTrdCxl::Value m)
|
||||
{
|
||||
return os << ExecTypTrdCxl::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(101);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(539);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionAck539(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionAck539 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -802,7 +809,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionAck539 &putClOrdID(const std::string& str)
|
||||
ExecutionAck539 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1352,6 +1359,11 @@ public:
|
||||
|
||||
std::string getSenderIDAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 4)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getSenderIDAsString();
|
||||
|
||||
@@ -1414,7 +1426,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionAck539 &putSenderID(const std::string& str)
|
||||
ExecutionAck539 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1654,6 +1666,11 @@ public:
|
||||
|
||||
std::string getLocationAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getLocationAsString();
|
||||
|
||||
@@ -1716,7 +1733,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionAck539 &putLocation(const std::string& str)
|
||||
ExecutionAck539 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -1808,11 +1825,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionAck539 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionAck539 _writer)
|
||||
{
|
||||
ExecutionAck539 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionAck539 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionAck539", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(222);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(247);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(534);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(222);
|
||||
return static_cast<std::uint16_t>(247);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportCancel534(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putExecID(const std::string& str)
|
||||
ExecutionReportCancel534 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putSenderID(const std::string& str)
|
||||
ExecutionReportCancel534 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putClOrdID(const std::string& str)
|
||||
ExecutionReportCancel534 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1877,7 +1884,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putLocation(const std::string& str)
|
||||
ExecutionReportCancel534 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3581,12 +3588,602 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 222;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 222, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 230;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 230, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 230, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9937;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= origOrderUserSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 231;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 231;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 231;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char origOrderUser(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 231 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &origOrderUser(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 231 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 231, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 231, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getOrigOrderUserAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 231;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getOrigOrderUserAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getOrigOrderUserAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 231;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportCancel534 &putOrigOrderUser(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 231, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 231 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putOrigOrderUser(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 231, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 231 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT
|
||||
{
|
||||
return 2807;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= cancelTextSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 239;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 239;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *cancelText() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 239;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char cancelText(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 239 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &cancelText(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 239 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getCancelText [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 239, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportCancel534 &putCancelText(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 239, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getCancelTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 239;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getCancelTextAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getCancelTextAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 239;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportCancel534 &putCancelText(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 239, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 239 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportCancel534 &putCancelText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 239, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 239 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportCancel534 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportCancel534 _writer)
|
||||
{
|
||||
ExecutionReportCancel534 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportCancel534 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportCancel534", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3742,7 +4339,39 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("OrigOrderUser": )";
|
||||
builder << '"' <<
|
||||
writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CancelText": )";
|
||||
builder << '"' <<
|
||||
writer.getCancelTextAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(210);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(219);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(524);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(210);
|
||||
return static_cast<std::uint16_t>(219);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportElimination524(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportElimination524 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportElimination524 &putExecID(const std::string& str)
|
||||
ExecutionReportElimination524 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportElimination524 &putSenderID(const std::string& str)
|
||||
ExecutionReportElimination524 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportElimination524 &putClOrdID(const std::string& str)
|
||||
ExecutionReportElimination524 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1877,7 +1884,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportElimination524 &putLocation(const std::string& str)
|
||||
ExecutionReportElimination524 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3308,12 +3315,140 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 210;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 210, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 218;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 218, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportElimination524 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 218, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportElimination524 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportElimination524 _writer)
|
||||
{
|
||||
ExecutionReportElimination524 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportElimination524 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportElimination524", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3453,7 +3588,29 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(225);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(226);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(531);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(225);
|
||||
return static_cast<std::uint16_t>(226);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportModify531(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportModify531 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportModify531 &putExecID(const std::string& str)
|
||||
ExecutionReportModify531 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportModify531 &putSenderID(const std::string& str)
|
||||
ExecutionReportModify531 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportModify531 &putClOrdID(const std::string& str)
|
||||
ExecutionReportModify531 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1877,7 +1884,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportModify531 &putLocation(const std::string& str)
|
||||
ExecutionReportModify531 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3589,12 +3596,93 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 225;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportModify531 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportModify531 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportModify531 _writer)
|
||||
{
|
||||
ExecutionReportModify531 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportModify531 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportModify531", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3750,7 +3838,18 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(217);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(226);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(522);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(217);
|
||||
return static_cast<std::uint16_t>(226);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportNew522(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportNew522 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportNew522 &putExecID(const std::string& str)
|
||||
ExecutionReportNew522 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportNew522 &putSenderID(const std::string& str)
|
||||
ExecutionReportNew522 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportNew522 &putClOrdID(const std::string& str)
|
||||
ExecutionReportNew522 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1877,7 +1884,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportNew522 &putLocation(const std::string& str)
|
||||
ExecutionReportNew522 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3447,12 +3454,140 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 217;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 217, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 225;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportNew522 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportNew522 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportNew522 _writer)
|
||||
{
|
||||
ExecutionReportNew522 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportNew522 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportNew522", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3600,7 +3735,29 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(194);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(219);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(564);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(194);
|
||||
return static_cast<std::uint16_t>(219);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportPendingCancel564(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putExecID(const std::string& str)
|
||||
ExecutionReportPendingCancel564 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putSenderID(const std::string& str)
|
||||
ExecutionReportPendingCancel564 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putClOrdID(const std::string& str)
|
||||
ExecutionReportPendingCancel564 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1688,7 +1695,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putLocation(const std::string& str)
|
||||
ExecutionReportPendingCancel564 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3022,12 +3029,602 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 194;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 194, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 202;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 202, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 202, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9937;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= origOrderUserSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 203;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 203;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 203;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char origOrderUser(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 203 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &origOrderUser(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 203 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 203, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 203, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getOrigOrderUserAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 203;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getOrigOrderUserAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getOrigOrderUserAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 203;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportPendingCancel564 &putOrigOrderUser(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 203, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 203 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putOrigOrderUser(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 203, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 203 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT
|
||||
{
|
||||
return 2807;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= cancelTextSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 211;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 211;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *cancelText() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 211;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char cancelText(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 211 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &cancelText(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 211 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getCancelText [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 211, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportPendingCancel564 &putCancelText(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 211, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getCancelTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 211;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getCancelTextAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getCancelTextAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 211;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportPendingCancel564 &putCancelText(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 211, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 211 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingCancel564 &putCancelText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 211, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 211 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportPendingCancel564 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportPendingCancel564 _writer)
|
||||
{
|
||||
ExecutionReportPendingCancel564 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportPendingCancel564 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportPendingCancel564", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3149,6 +3746,31 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("OrigOrderUser": )";
|
||||
builder << '"' <<
|
||||
writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CancelText": )";
|
||||
builder << '"' <<
|
||||
writer.getCancelTextAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(195);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(196);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(565);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(195);
|
||||
return static_cast<std::uint16_t>(196);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportPendingReplace565(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportPendingReplace565 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingReplace565 &putExecID(const std::string& str)
|
||||
ExecutionReportPendingReplace565 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingReplace565 &putSenderID(const std::string& str)
|
||||
ExecutionReportPendingReplace565 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingReplace565 &putClOrdID(const std::string& str)
|
||||
ExecutionReportPendingReplace565 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1688,7 +1695,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportPendingReplace565 &putLocation(const std::string& str)
|
||||
ExecutionReportPendingReplace565 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3085,12 +3092,93 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 195;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportPendingReplace565 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportPendingReplace565 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportPendingReplace565 _writer)
|
||||
{
|
||||
ExecutionReportPendingReplace565 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportPendingReplace565 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportPendingReplace565", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3216,6 +3304,10 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(475);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(483);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(523);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(475);
|
||||
return static_cast<std::uint16_t>(483);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportReject523(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportReject523 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportReject523 &putText(const std::string& str)
|
||||
ExecutionReportReject523 &putText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportReject523 &putExecID(const std::string& str)
|
||||
ExecutionReportReject523 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportReject523 &putSenderID(const std::string& str)
|
||||
ExecutionReportReject523 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1286,7 +1293,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportReject523 &putClOrdID(const std::string& str)
|
||||
ExecutionReportReject523 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -2083,7 +2090,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportReject523 &putLocation(const std::string& str)
|
||||
ExecutionReportReject523 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3724,12 +3731,64 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 475;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 475, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportReject523 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportReject523 _writer)
|
||||
{
|
||||
ExecutionReportReject523 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportReject523 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportReject523", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3886,7 +3945,25 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(488);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(513);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(532);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(488);
|
||||
return static_cast<std::uint16_t>(513);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportStatus532(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putText(const std::string& str)
|
||||
ExecutionReportStatus532 &putText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putExecID(const std::string& str)
|
||||
ExecutionReportStatus532 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putSenderID(const std::string& str)
|
||||
ExecutionReportStatus532 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1286,7 +1293,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putClOrdID(const std::string& str)
|
||||
ExecutionReportStatus532 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -2225,7 +2232,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putLocation(const std::string& str)
|
||||
ExecutionReportStatus532 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3728,12 +3735,602 @@ public:
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 488;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 488, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 496;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 496, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 496, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9937;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= origOrderUserSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 497;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 497;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 497;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char origOrderUser(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 497 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &origOrderUser(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for origOrderUser [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 497 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 497, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 497, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getOrigOrderUserAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 497;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getOrigOrderUserAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getOrigOrderUserAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 497;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportStatus532 &putOrigOrderUser(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 497, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 497 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putOrigOrderUser(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 497, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 497 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "String";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT
|
||||
{
|
||||
return 2807;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= cancelTextSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 505;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 505;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char *cancelText() SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return m_buffer + m_offset + 505;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char cancelText(const std::uint64_t index) const
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E104]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 505 + (index * 1), sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &cancelText(const std::uint64_t index, const char value)
|
||||
{
|
||||
if (index >= 8)
|
||||
{
|
||||
throw std::runtime_error("index out of range for cancelText [E105]");
|
||||
}
|
||||
|
||||
char val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 505 + (index * 1), &val, sizeof(char));
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const
|
||||
{
|
||||
if (length > 8)
|
||||
{
|
||||
throw std::runtime_error("length too large for getCancelText [E106]");
|
||||
}
|
||||
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 505, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
ExecutionReportStatus532 &putCancelText(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 505, src, sizeof(char) * 8);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::string getCancelTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 505;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string getCancelTextAsJsonEscapedString()
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
std::string s = getCancelTextAsString();
|
||||
|
||||
for (const auto c : s)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': oss << "\\\""; break;
|
||||
case '\\': oss << "\\\\"; break;
|
||||
case '\b': oss << "\\b"; break;
|
||||
case '\f': oss << "\\f"; break;
|
||||
case '\n': oss << "\\n"; break;
|
||||
case '\r': oss << "\\r"; break;
|
||||
case '\t': oss << "\\t"; break;
|
||||
|
||||
default:
|
||||
if ('\x00' <= c && c <= '\x1f')
|
||||
{
|
||||
oss << "\\u" << std::hex << std::setw(4)
|
||||
<< std::setfill('0') << (int)(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 505;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 8 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionReportStatus532 &putCancelText(const std::string_view str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 505, str.data(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 505 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportStatus532 &putCancelText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 8)
|
||||
{
|
||||
throw std::runtime_error("string too large for putCancelText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 505, str.c_str(), srcLength);
|
||||
for (std::size_t start = srcLength; start < 8; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 505 + start] = 0;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportStatus532 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportStatus532 _writer)
|
||||
{
|
||||
ExecutionReportStatus532 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportStatus532 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportStatus532", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -3898,7 +4495,39 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("OrigOrderUser": )";
|
||||
builder << '"' <<
|
||||
writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CancelText": )";
|
||||
builder << '"' <<
|
||||
writer.getCancelTextAsJsonEscapedString().c_str() << '"';
|
||||
|
||||
builder << '}';
|
||||
|
||||
|
||||
+109
-75
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(222);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(548);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeAddendumOutright548 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumOutright548 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeAddendumOutright548 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1759,7 +1766,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumOutright548 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeAddendumOutright548 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3366,7 +3373,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3374,8 +3381,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3384,17 +3390,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3714,7 +3709,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -3804,8 +3799,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -4017,7 +4012,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -4025,8 +4020,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -4035,17 +4029,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4282,7 +4265,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -4747,8 +4730,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -4781,11 +4764,25 @@ public:
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ContraGrossTradeAmt": )";
|
||||
builder << writer.contraGrossTradeAmt();
|
||||
if (writer.contraGrossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.contraGrossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ContraCalculatedCcyLastQty": )";
|
||||
builder << writer.contraCalculatedCcyLastQty();
|
||||
if (writer.contraCalculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.contraCalculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << '}';
|
||||
|
||||
@@ -4855,11 +4852,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeAddendumOutright548 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeAddendumOutright548 _writer)
|
||||
{
|
||||
ExecutionReportTradeAddendumOutright548 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeAddendumOutright548 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeAddendumOutright548", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -4983,7 +4985,14 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("TrdType": )";
|
||||
@@ -5003,29 +5012,51 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CalculatedCcyLastQty": )";
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
if (writer.calculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("GrossTradeAmt": )";
|
||||
builder << writer.grossTradeAmt();
|
||||
if (writer.grossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.grossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("BenchmarkPrice": )";
|
||||
builder << writer.benchmarkPrice();
|
||||
if (writer.benchmarkPriceInActingVersion())
|
||||
{
|
||||
builder << writer.benchmarkPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5033,15 +5064,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5052,14 +5084,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(187);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(549);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeAddendumSpread549 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpread549 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpread549 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1759,7 +1766,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpread549 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpread549 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3082,7 +3089,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3090,8 +3097,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3100,17 +3106,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3430,7 +3425,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -3520,8 +3515,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -3733,7 +3728,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3741,8 +3736,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3751,17 +3745,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4300,8 +4283,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoLegs writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoLegs writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("LegExecID": )";
|
||||
@@ -4528,7 +4511,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -4536,8 +4519,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -4546,17 +4528,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4793,7 +4764,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -5164,8 +5135,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -5264,11 +5235,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeAddendumSpread549 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeAddendumSpread549 _writer)
|
||||
{
|
||||
ExecutionReportTradeAddendumSpread549 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeAddendumSpread549 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeAddendumSpread549", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -5406,15 +5382,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5422,15 +5399,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoLegs": [)";
|
||||
writer.noLegs().forEach([&](NoLegs& noLegs)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noLegs().forEach(
|
||||
[&](NoLegs &noLegs)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noLegs;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noLegs;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5438,15 +5416,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5457,18 +5436,21 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noLegs().forEach([](NoLegs e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noLegsGroup { noLegs() };
|
||||
while (noLegsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noLegsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
+77
-71
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(196);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(550);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1759,7 +1766,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -2753,7 +2760,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -2761,8 +2768,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -2771,17 +2777,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3101,7 +3096,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -3191,8 +3186,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -3404,7 +3399,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3412,8 +3407,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3422,17 +3416,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3669,7 +3652,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -4040,8 +4023,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -4140,11 +4123,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeAddendumSpreadLeg550 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeAddendumSpreadLeg550 _writer)
|
||||
{
|
||||
ExecutionReportTradeAddendumSpreadLeg550 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeAddendumSpreadLeg550 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeAddendumSpreadLeg550", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -4252,25 +4240,40 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CalculatedCcyLastQty": )";
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
if (writer.calculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("GrossTradeAmt": )";
|
||||
builder << writer.grossTradeAmt();
|
||||
if (writer.grossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.grossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -4278,15 +4281,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -4297,14 +4301,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -164,10 +165,10 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(276);
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(293);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(525);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -220,7 +222,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(276);
|
||||
return static_cast<std::uint16_t>(293);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeOutright525(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeOutright525 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeOutright525 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeOutright525 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeOutright525 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeOutright525 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeOutright525 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeOutright525 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1995,7 +2002,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeOutright525 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeOutright525 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -4224,6 +4231,176 @@ public:
|
||||
return m_benchmarkPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9562;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= reservationPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 276;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_reservationPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &reservationPrice()
|
||||
{
|
||||
m_reservationPrice.wrap(m_buffer, m_offset + 276, m_actingVersion, m_bufferLength);
|
||||
return m_reservationPrice;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "int";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT
|
||||
{
|
||||
return 638;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= priorityIndicatorSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 284;
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 8)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 284, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
ExecutionReportTradeOutright525 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val = (value);
|
||||
std::memcpy(m_buffer + m_offset + 284, &val, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *DisplayLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "Price";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t displayLimitPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 9264;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayLimitPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool displayLimitPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= displayLimitPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayLimitPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 285;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_displayLimitPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &displayLimitPrice()
|
||||
{
|
||||
m_displayLimitPrice.wrap(m_buffer, m_offset + 285, m_actingVersion, m_bufferLength);
|
||||
return m_displayLimitPrice;
|
||||
}
|
||||
|
||||
class NoFills
|
||||
{
|
||||
private:
|
||||
@@ -4350,7 +4527,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -4358,8 +4535,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -4368,17 +4544,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4698,7 +4863,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -4788,8 +4953,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -5001,7 +5166,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -5009,8 +5174,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -5019,17 +5183,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -5266,7 +5419,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -5655,8 +5808,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -5685,11 +5838,25 @@ public:
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ContraGrossTradeAmt": )";
|
||||
builder << writer.contraGrossTradeAmt();
|
||||
if (writer.contraGrossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.contraGrossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ContraCalculatedCcyLastQty": )";
|
||||
builder << writer.contraCalculatedCcyLastQty();
|
||||
if (writer.contraCalculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.contraCalculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << '}';
|
||||
|
||||
@@ -5759,11 +5926,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeOutright525 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeOutright525 _writer)
|
||||
{
|
||||
ExecutionReportTradeOutright525 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeOutright525 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeOutright525", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -5939,7 +6111,14 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
if (writer.discretionPriceInActingVersion())
|
||||
{
|
||||
builder << writer.discretionPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("TrdType": )";
|
||||
@@ -5959,29 +6138,77 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CalculatedCcyLastQty": )";
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
if (writer.calculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("GrossTradeAmt": )";
|
||||
builder << writer.grossTradeAmt();
|
||||
if (writer.grossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.grossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("BenchmarkPrice": )";
|
||||
builder << writer.benchmarkPrice();
|
||||
if (writer.benchmarkPriceInActingVersion())
|
||||
{
|
||||
builder << writer.benchmarkPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("ReservationPrice": )";
|
||||
if (writer.reservationPriceInActingVersion())
|
||||
{
|
||||
builder << writer.reservationPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("PriorityIndicator": )";
|
||||
builder << +writer.priorityIndicator();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DisplayLimitPrice": )";
|
||||
if (writer.displayLimitPriceInActingVersion())
|
||||
{
|
||||
builder << writer.displayLimitPrice();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5989,15 +6216,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -6008,14 +6236,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(230);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(526);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeSpread526(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeSpread526 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpread526 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeSpread526 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpread526 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeSpread526 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpread526 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeSpread526 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1995,7 +2002,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpread526 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeSpread526 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -3727,7 +3734,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3735,8 +3742,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3745,17 +3751,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4075,7 +4070,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -4165,8 +4160,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -4378,7 +4373,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -4386,8 +4381,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -4396,17 +4390,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -4803,8 +4786,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoLegs writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoLegs writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("LegExecID": )";
|
||||
@@ -5023,7 +5006,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -5031,8 +5014,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -5041,17 +5023,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -5288,7 +5259,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -5583,8 +5554,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -5679,11 +5650,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeSpread526 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeSpread526 _writer)
|
||||
{
|
||||
ExecutionReportTradeSpread526 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeSpread526 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeSpread526", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -5853,15 +5829,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5869,15 +5846,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoLegs": [)";
|
||||
writer.noLegs().forEach([&](NoLegs& noLegs)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noLegs().forEach(
|
||||
[&](NoLegs &noLegs)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noLegs;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noLegs;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5885,15 +5863,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -5904,18 +5883,21 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noLegs().forEach([](NoLegs e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noLegsGroup { noLegs() };
|
||||
while (noLegsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noLegsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -156,6 +156,7 @@ private:
|
||||
std::uint64_t m_bufferLength = 0;
|
||||
std::uint64_t m_offset = 0;
|
||||
std::uint64_t m_position = 0;
|
||||
std::uint64_t m_actingBlockLength = 0;
|
||||
std::uint64_t m_actingVersion = 0;
|
||||
|
||||
inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(219);
|
||||
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(527);
|
||||
static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(8);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(7);
|
||||
static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(8);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
@@ -200,6 +201,7 @@ public:
|
||||
m_bufferLength(bufferLength),
|
||||
m_offset(offset),
|
||||
m_position(sbeCheckPosition(offset + actingBlockLength)),
|
||||
m_actingBlockLength(actingBlockLength),
|
||||
m_actingVersion(actingVersion)
|
||||
{
|
||||
}
|
||||
@@ -240,7 +242,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
@@ -286,6 +288,11 @@ public:
|
||||
return *this = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, actingBlockLength, actingVersion);
|
||||
}
|
||||
|
||||
ExecutionReportTradeSpreadLeg527 &sbeRewind()
|
||||
{
|
||||
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_position;
|
||||
@@ -668,7 +675,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpreadLeg527 &putExecID(const std::string& str)
|
||||
ExecutionReportTradeSpreadLeg527 &putExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
@@ -874,7 +881,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string& str)
|
||||
ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1080,7 +1087,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string& str)
|
||||
ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
@@ -1782,7 +1789,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
ExecutionReportTradeSpreadLeg527 &putLocation(const std::string& str)
|
||||
ExecutionReportTradeSpreadLeg527 &putLocation(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -2969,7 +2976,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -2977,8 +2984,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -2987,17 +2993,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3317,7 +3312,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoFills &putFillExecID(const std::string& str)
|
||||
NoFills &putFillExecID(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
@@ -3407,8 +3402,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoFills writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoFills writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("FillPx": )";
|
||||
@@ -3620,7 +3615,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
|
||||
inline std::uint64_t resetCountToIndex()
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
@@ -3628,8 +3623,7 @@ public:
|
||||
return m_count;
|
||||
}
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
template<class Func> inline void forEach(Func& func)
|
||||
template<class Func> inline void forEach(Func &&func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
@@ -3638,17 +3632,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
template<class Func> inline void forEach(Func&& func)
|
||||
{
|
||||
while (hasNext())
|
||||
{
|
||||
next();
|
||||
func(*this);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
@@ -3885,7 +3868,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
NoOrderEvents &putOrderEventText(const std::string& str)
|
||||
NoOrderEvents &putOrderEventText(const std::string &str)
|
||||
{
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
@@ -4180,8 +4163,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NoOrderEvents writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, NoOrderEvents writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("OrderEventPx": )";
|
||||
@@ -4276,11 +4259,16 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, ExecutionReportTradeSpreadLeg527 _writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, ExecutionReportTradeSpreadLeg527 _writer)
|
||||
{
|
||||
ExecutionReportTradeSpreadLeg527 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
ExecutionReportTradeSpreadLeg527 writer(
|
||||
_writer.m_buffer,
|
||||
_writer.m_offset,
|
||||
_writer.m_bufferLength,
|
||||
_writer.m_actingBlockLength,
|
||||
_writer.m_actingVersion);
|
||||
|
||||
builder << '{';
|
||||
builder << R"("Name": "ExecutionReportTradeSpreadLeg527", )";
|
||||
builder << R"("sbeTemplateId": )";
|
||||
@@ -4400,25 +4388,40 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("CalculatedCcyLastQty": )";
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
if (writer.calculatedCcyLastQtyInActingVersion())
|
||||
{
|
||||
builder << writer.calculatedCcyLastQty();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("GrossTradeAmt": )";
|
||||
builder << writer.grossTradeAmt();
|
||||
if (writer.grossTradeAmtInActingVersion())
|
||||
{
|
||||
builder << writer.grossTradeAmt();
|
||||
}
|
||||
else
|
||||
{
|
||||
builder << "{}";
|
||||
}
|
||||
|
||||
builder << ", ";
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoFills": [)";
|
||||
writer.noFills().forEach([&](NoFills& noFills)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noFills().forEach(
|
||||
[&](NoFills &noFills)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noFills;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -4426,15 +4429,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
{
|
||||
bool atLeastOne = false;
|
||||
builder << R"("NoOrderEvents": [)";
|
||||
writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents)
|
||||
{
|
||||
if (atLeastOne)
|
||||
writer.noOrderEvents().forEach(
|
||||
[&](NoOrderEvents &noOrderEvents)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
if (atLeastOne)
|
||||
{
|
||||
builder << ", ";
|
||||
}
|
||||
atLeastOne = true;
|
||||
builder << noOrderEvents;
|
||||
});
|
||||
builder << ']';
|
||||
}
|
||||
|
||||
@@ -4445,14 +4449,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
|
||||
void skip()
|
||||
{
|
||||
noFills().forEach([](NoFills e)
|
||||
auto &noFillsGroup { noFills() };
|
||||
while (noFillsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEvents().forEach([](NoOrderEvents e)
|
||||
noFillsGroup.next().skip();
|
||||
}
|
||||
auto &noOrderEventsGroup { noOrderEvents() };
|
||||
while (noOrderEventsGroup.hasNext())
|
||||
{
|
||||
e.skip();
|
||||
});
|
||||
noOrderEventsGroup.next().skip();
|
||||
}
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_EXPCYCLE_H_
|
||||
#define _ILINKBINARY_EXPCYCLE_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExpCycle
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ExpCycle::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ExpCycle::Value m)
|
||||
{
|
||||
return os << ExpCycle::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_FTI_H_
|
||||
#define _ILINKBINARY_FTI_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class FTI
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, FTI::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, FTI::Value m)
|
||||
{
|
||||
return os << FTI::c_str(m);
|
||||
}
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::uint16_t>(7);
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
@@ -338,8 +338,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, GroupSize writer)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &builder, GroupSize writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("blockLength": )";
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_KEEPALIVELAPSED_H_
|
||||
#define _ILINKBINARY_KEEPALIVELAPSED_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class KeepAliveLapsed
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, KeepAliveLapsed::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, KeepAliveLapsed::Value m)
|
||||
{
|
||||
return os << KeepAliveLapsed::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_LISTUPDACT_H_
|
||||
#define _ILINKBINARY_LISTUPDACT_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ListUpdAct
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ListUpdAct::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ListUpdAct::Value m)
|
||||
{
|
||||
return os << ListUpdAct::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MANUALORDIND_H_
|
||||
#define _ILINKBINARY_MANUALORDIND_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ManualOrdInd
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ManualOrdInd::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ManualOrdInd::Value m)
|
||||
{
|
||||
return os << ManualOrdInd::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MANUALORDINDREQ_H_
|
||||
#define _ILINKBINARY_MANUALORDINDREQ_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ManualOrdIndReq
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, ManualOrdIndReq::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, ManualOrdIndReq::Value m)
|
||||
{
|
||||
return os << ManualOrdIndReq::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MASSACTIONORDTYP_H_
|
||||
#define _ILINKBINARY_MASSACTIONORDTYP_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionOrdTyp
|
||||
@@ -96,7 +32,7 @@ public:
|
||||
{
|
||||
Limit = static_cast<char>(50),
|
||||
StopLimit = static_cast<char>(52),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
NULL_VALUE = static_cast<char>(48)
|
||||
};
|
||||
|
||||
static MassActionOrdTyp::Value get(const char value)
|
||||
@@ -105,7 +41,7 @@ public:
|
||||
{
|
||||
case static_cast<char>(50): return Limit;
|
||||
case static_cast<char>(52): return StopLimit;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
case static_cast<char>(48): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]");
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionOrdTyp::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, MassActionOrdTyp::Value m)
|
||||
{
|
||||
return os << MassActionOrdTyp::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MASSACTIONRESPONSE_H_
|
||||
#define _ILINKBINARY_MASSACTIONRESPONSE_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionResponse
|
||||
@@ -124,8 +60,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionResponse::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, MassActionResponse::Value m)
|
||||
{
|
||||
return os << MassActionResponse::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MASSACTIONSCOPE_H_
|
||||
#define _ILINKBINARY_MASSACTIONSCOPE_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionScope
|
||||
@@ -133,8 +69,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionScope::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, MassActionScope::Value m)
|
||||
{
|
||||
return os << MassActionScope::c_str(m);
|
||||
}
|
||||
|
||||
@@ -2,80 +2,17 @@
|
||||
#ifndef _ILINKBINARY_MASSCANCELTIF_H_
|
||||
#define _ILINKBINARY_MASSCANCELTIF_H_
|
||||
|
||||
#if defined(SBE_HAVE_CMATH)
|
||||
/* cmath needed for std::numeric_limits<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define SBE_CONSTEXPR constexpr
|
||||
# define SBE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SBE_CONSTEXPR
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
#else
|
||||
# define SBE_NODISCARD
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
@@ -86,7 +23,6 @@
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassCancelTIF
|
||||
@@ -127,8 +63,8 @@ public:
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& os, MassCancelTIF::Value m)
|
||||
friend std::basic_ostream<CharT, Traits> & operator << (
|
||||
std::basic_ostream<CharT, Traits> &os, MassCancelTIF::Value m)
|
||||
{
|
||||
return os << MassCancelTIF::c_str(m);
|
||||
}
|
||||
|
||||
Loaded 100 of 202 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user