Compare commits

...
29 Commits
Author SHA1 Message Date
petefisher78 4fd9442e5f Update externals submodule URL to Gitea 2026-11-12 10:19:56 -05:00
John Colvin 9a85a475db fix: Revert accidental change to externals 2023-01-10 09:51:54 -05:00
Taha Afzal 8a1ab0ba9e Updating generated files (and minor code adjustment) for CME schema 8 changes: 2023-01-09 10:28:10 -05:00
John Colvin 57ac54b6c5 build (sparkd): Pipe 'eval' cmd stdout/err back to shell
So we can actually see the build output
2023-01-05 14:03:40 -05:00
johncolvin-og 4a8433246c build: Use unix eol in build_sparkd, exec not eval 2023-01-05 14:03:40 -05:00
John Colvin d6351cd187 Update docker/linux
To get python3-venv
2023-01-05 14:03:40 -05:00
John Colvin eef263f2e7 build: Ensure python virtual env is installed/up-to-date 2023-01-05 14:03:40 -05:00
johncolvin-og 2009027586 build: Port build/publish_spark scripts over from crypto branches 2023-01-05 14:03:40 -05:00
John Colvin feaad6335d build: Set up cmake 'install' build target
The 'install' build target creates a self-contained (deployable) sparkd
package. It copies the sparkd executable and its dependencies into a
single directory (no symlinks), which can then be copied/deployed to
another machine.

Run `cmake --build . --target install` to install sparkd in the
directory defined by the CMAKE_INSTALL_PREFIX variable.
2023-01-05 14:03:40 -05:00
John Colvin b96612d37b fix build (linux): Port py3 build scripts over from spark_crypto.dev 2023-01-05 14:03:40 -05:00
John Colvin 84f9338005 Add .venv dirs to .gitignore 2023-01-05 14:03:40 -05:00
John Colvin 2837f3edfb chore: Add requirements.txt (py venv) 2023-01-05 14:03:40 -05:00
John Colvin a82932652b fix build: Copy a handful of files over from spark_crypto.dev
This fixes the last of the boost-related errors
2022-09-28 19:49:17 -04:00
John Colvin c9b5ff844f fix build (partial): Update externals to get new websocketpp
This fixes some of the boost errors related to the recent boost upgrade
2022-09-28 19:47:39 -04:00
John Colvin b0cbc2cb71 fix build: Disable web build
That's one way to fix it!
2022-09-28 19:33:19 -04:00
BTS User b2a2cae9c1 test 2022-09-28 13:44:48 -04:00
BTS User 93d9a924e9 test 2022-09-28 13:39:09 -04:00
BTS User 9d699711c1 test 2022-09-28 13:31:29 -04:00
BTS User 5951691cbd test 2022-09-28 13:28:20 -04:00
BTS Devs cbff70d5a1 plugin.py edited online with Bitbucket 2022-09-28 16:10:31 +00:00
BTS Devs b59d45ae28 plugin.py edited online with Bitbucket 2022-09-28 16:07:14 +00:00
BTS Devs ea6e158e63 plugin.py edited online with Bitbucket 2022-09-28 15:54:41 +00:00
BTS Devs 55a32935a9 plugin.py edited online with Bitbucket 2022-09-28 15:41:32 +00:00
BTS Devs 9f895df70c audit_ice.py edited online with Bitbucket 2022-09-23 21:25:37 +00:00
BTS Devs 8551936383 audit_upload.sh edited online with Bitbucket 2022-09-20 15:36:21 +00:00
John Colvin cb0378d785 fix: Load FairValueLine price type in settings dialog 2021-07-02 13:55:34 -04:00
John Colvin 489ac45722 Add fair value lines for DJ 2021-06-29 14:07:08 -04:00
John Colvin d910c65e20 fix: ContractPicker syncs selected sec/md w/ selected key 2021-06-29 15:18:06 -04:00
Pedro Pinto cb0e4de6c5 Updated TradingSystemName in IL3 connection. 2021-04-29 15:13:09 -04:00
189 changed files with 13097 additions and 7462 deletions

No files matched your search

+1
View File
@@ -37,3 +37,4 @@ trace_data/
*.rej
/build
.clangd/
.venv/**
+6 -3
View File
@@ -1,9 +1,12 @@
[submodule "externals"]
path = externals
url = git@bitbucket.org:bluetradesys/externals.git
url = https://git.wearethefishers.com/petefisher78/externals.git
[submodule "docker/linux"]
path = docker/linux
url = git@bitbucket.org:bluetradesys/linux_docker.git
url = https://git.wearethefishers.com/petefisher78/linux_docker.git
[submodule "docker/windows"]
path = docker/windows
url = git@bitbucket.org:bluetradesys/windows_docker.git
url = https://git.wearethefishers.com/petefisher78/windows_docker.git
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg.git
+4 -1
View File
@@ -52,7 +52,7 @@ else ()
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
add_subdirectory(src/server/sparkd)
add_subdirectory(src/lib)
add_subdirectory(src/web)
# add_subdirectory(src/web)
add_subdirectory(doc/user)
add_subdirectory(src/sdk)
add_subdirectory(src/data_files)
@@ -70,4 +70,7 @@ else ()
DEPENDS sparkd data_files_dir)
add_custom_target(server_layout ALL DEPENDS ${CMAKE_BINARY_DIR}/server)
install(FILES "${CMAKE_SOURCE_DIR}/externals/linux/lib/${CMAKE_BUILD_TYPE}/libACE-5.7.5.so" DESTINATION bin)
install(FILES "${CMAKE_SOURCE_DIR}/externals/linux/lib/${CMAKE_BUILD_TYPE}/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.16.0.0" DESTINATION bin)
endif()
+21
View File
@@ -0,0 +1,21 @@
astroid==2.7.3
autopep8==1.5.7
cffi==1.14.6
colorama==0.4.4
isort==5.9.3
lazy-object-proxy==1.6.0
mccabe==0.6.1
pkg_resources==0.0.0
platformdirs==2.3.0
protobuf==3.19.1
pybars3==0.9.7
pycodestyle==2.7.0
pycparser==2.20
pylint==2.10.2
PyMeta3==0.5.1
termcolor==1.1.0
toml==0.10.2
typed-ast==1.4.3
typing_extensions==4.1.1
wrapt==1.12.1
yapf==0.31.0
@@ -203,6 +203,37 @@ namespace mbts.spark {
_type_hash;
}
[ProtoContract]
class FairValueLine : IEquatable<FairValueLine> {
public enum PriceType {
Bid,
Ask,
Mid
}
[ProtoMember(1)]
public uint security_key { get; set; }
[ProtoMember(2)]
public PriceType price_type { get; set; }
[ProtoMember(3)]
public LadderMarketBreakLine display { get; set; }
public bool Equals(FairValueLine other) {
return other != null &&
security_key == other.security_key &&
price_type == other.price_type &&
display.safe_equals(other.display);
}
public override bool Equals(object obj) {
return Equals(obj as FairValueLine);
}
public override int GetHashCode() {
return (int)security_key;
}
}
[Flags]
enum LadderFavoriteAlgoFlags {
Sticky = 1,
@@ -477,6 +508,7 @@ namespace mbts.spark {
// so GetHashCode must return the same hash for every instance.
static readonly int _type_hash = typeof(LadderSettings).GetHashCode();
uint _ticks_per_row;
List<FairValueLine> _fair_value_lines;
static LadderSettings() {
var knobs = config.Configuration.get<bts.config.LadderKnobs>();
@@ -786,6 +818,11 @@ namespace mbts.spark {
public LadderOrderLimits ladder_order_limits { get; set; }
[ProtoMember(901)]
public LadderPanelPricePointSettings panel_price_point_settings { get; set; }
[ProtoMember(902)]
public List<FairValueLine> fair_value_lines {
get => _fair_value_lines ?? (_fair_value_lines = new List<FairValueLine>());
set => _fair_value_lines = value;
}
public void sanitize() =>
sanitize(this);
@@ -822,6 +859,9 @@ namespace mbts.spark {
s.row_height = LadderRender.measure_row_height(s);
if (s.panel_price_point_settings is null)
s.panel_price_point_settings = LadderPanelPricePointSettings.Default;
if (s.fair_value_lines is null) {
s.fair_value_lines = new List<FairValueLine>(0);
}
return s;
}
@@ -897,7 +937,8 @@ namespace mbts.spark {
a.status_message_visible == b.status_message_visible &&
a.ladder_order_limits.safe_equals(b.ladder_order_limits) &&
a.panel_price_point_settings.safe_equals(b.panel_price_point_settings) &&
a._ticks_per_row == b._ticks_per_row;
a._ticks_per_row == b._ticks_per_row &&
EqualityComparer.safe_sequence_equals(a.fair_value_lines, b.fair_value_lines);
public bool Equals(LadderSettings other) =>
profile_equals(this, other) &&
@@ -208,6 +208,10 @@ namespace bts.shell {
s => {
var svm = new LadderSettingsVM(model.order_gateway, vm.security);
svm.load(s);
svm.SubscribeDisposed(
_bus.subscribe(SparkTags.SecuritiesTag)
.OnDispatcher()
.Subscribe(sec_map => svm.security_map = sec_map));
return svm;
},
_ => _,
@@ -331,4 +335,4 @@ namespace bts.shell {
[ProtoMember(3)]
public uint settings_id;
}
}
}
@@ -0,0 +1,93 @@
using mbts.ui;
using mbts.ui.controls.color_picker;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Input;
using System.Windows.Media;
namespace mbts.spark {
class FairValueLineSettingsVM : ui.shell.ViewModelBase {
IReadOnlyDictionary<uint, SecurityMD> _security_map = DictionaryHelper.empty<uint, SecurityMD>();
public FairValueLineSettingsVM() {
add_item_cmd = new DelegateCommand(() => items.Add(new FairValueLineItemSettingsVM()));
remove_item_cmd = new DelegateCommand<FairValueLineItemSettingsVM>(item => items.Remove(item));
}
public ObservableCollection<FairValueLineItemSettingsVM> items { get; } =
new ObservableCollection<FairValueLineItemSettingsVM>();
public IReadOnlyDictionary<uint, SecurityMD> security_map {
get => _security_map;
set => Set(ref _security_map, value);
}
public ICommand add_item_cmd { get; }
public ICommand remove_item_cmd { get; }
}
class FairValueLineItemSettingsVM : ui.shell.ViewModelBase {
uint _selected_security_key;
FairValueLine.PriceType _selected_price_type;
Color _color;
bool _show = true;
bool _auto_refresh = true;
public FairValueLineItemSettingsVM() {
palettes = new ObservableCollection<ColorPaletteVM>(ColorPalette.all_presets().Select(p => new ColorPaletteVM(p)));
}
public uint selected_security_key {
get => _selected_security_key;
set => Set(ref _selected_security_key, value);
}
public IEnumerable<FairValueLine.PriceType> price_types =>
ui.utility.EnumHelper.get_values<FairValueLine.PriceType>();
public FairValueLine.PriceType selected_price_type {
get => _selected_price_type;
set => Set(ref _selected_price_type, value);
}
public Color color { get => _color; set => Set(ref _color, value); }
public bool show { get => _show; set => Set(ref _show, value); }
public bool auto_refresh {
get => _auto_refresh; set {
if (Set(ref _auto_refresh, value)) {
RaisePropertyChanged(nameof(refresh_mode));
}
}
}
public LadderMarketBreakLine.RefreshMode refresh_mode {
get => _auto_refresh ? LadderMarketBreakLine.RefreshMode.Auto : LadderMarketBreakLine.RefreshMode.Manual;
set => auto_refresh = value == LadderMarketBreakLine.RefreshMode.Auto;
}
public ObservableCollection<ColorPaletteVM> palettes { get; }
public void assign_from(FairValueLine settings) {
if (settings is null) {
settings = new FairValueLine();
}
selected_security_key = settings.security_key;
selected_price_type = settings.price_type;
var display = settings.display ?? new LadderMarketBreakLine();
show = display.show;
color = display.color.rgb_color();
refresh_mode = display.refresh_mode;
}
public FairValueLine create() {
return new FairValueLine {
security_key = selected_security_key,
price_type = _selected_price_type,
display = new LadderMarketBreakLine {
color = color.rgb_color(),
show = show,
refresh_mode = refresh_mode
}
};
}
}
}
@@ -0,0 +1,121 @@
using mbts.co2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace mbts.spark {
class FairValueLineVM {
NativePriceSize _bid;
NativePriceSize _ask;
double _settlement;
double _frozen;
ulong _last_update;
public FairValueLineVM(uint sec_id) {
this.sec_id = sec_id;
}
public FairValueLineVM(FairValueLine fvl, SecurityMD? sec_md = null) {
sec_id = fvl.security_key;
price_type = fvl.price_type;
settings = fvl.display;
this.sec_md = sec_md;
}
public FairValueLine.PriceType price_type { get; private set; }
public double price { get; private set; }
public double price_view {
get {
if (!settings.show) {
return double.NaN;
}
switch (settings.refresh_mode) {
case LadderMarketBreakLine.RefreshMode.Auto:
return price;
case LadderMarketBreakLine.RefreshMode.Manual:
return frozen;
default: return double.NaN;
}
}
}
public double frozen {
get {
if (double.IsNaN(_frozen)) {
_frozen = price;
}
return _frozen;
}
}
public Color color { get; set; }
public uint sec_id { get; }
SecurityMD? _sec_md;
public SecurityMD? sec_md {
get => _sec_md;
set {
if (_sec_md == value) {
return;
}
if (value.HasValue && value.Value.security.Id != sec_id) {
throw new ArgumentException("'sec_md' security id must be equal to 'sec_id'", nameof(sec_md));
}
_sec_md = value;
refresh(true);
}
}
public LadderMarketBreakLine settings { get; set; } = new LadderMarketBreakLine();
public void load(LadderMarketBreakLine settings, FairValueLine.PriceType price_type) {
this.settings = settings;
if (this.price_type != price_type) {
this.price_type = price_type;
refresh(true);
}
}
public void refresh(bool update_frozen) {
if (sec_md.HasValue) {
var old_settlement = _settlement;
_settlement = sec_md.Value.md.settlement_price;
if (sec_md.Value.md.get_bbo(ref _last_update, out _bid, out _ask) || _settlement != old_settlement) {
price = _read_price();
}
} else {
price = double.NaN;
}
if (update_frozen) {
_frozen = price;
}
}
double _read_price() {
if (!_sec_md.HasValue) {
return double.NaN;
}
var bid = _bid.price;
var ask = _ask.price;
switch (price_type) {
case FairValueLine.PriceType.Bid:
return LadderPriceLineViewAdapter.bid_line(
_bid.price, _ask.price, _settlement, sec_md.Value.security.ContractSpec);
case FairValueLine.PriceType.Ask:
return _ask.is_nan ? double.NaN : _ask.price;
case FairValueLine.PriceType.Mid:
if (_bid.is_nan) {
if (_ask.is_nan) {
return double.NaN;
}
return _ask.price;
}
if (_ask.is_nan) {
return _bid.price;
}
return (_bid.price + _ask.price) / 2;
default: return double.NaN;
}
}
}
}
@@ -46,6 +46,9 @@ namespace mbts.spark {
readonly ObservableKeyedCollection<AlgoDefinitionVM, AlgoKey> _algo_definitions = new ObservableKeyedCollection<AlgoDefinitionVM, AlgoKey>(d => d.key);
readonly OrdersModel _model;
readonly SecurityImmutable _security;
IReadOnlyDictionary<uint, SecurityMD> _security_map =
DictionaryHelper.empty<uint, SecurityMD>();
uint? _desired_account;
AlgoID? _desired_algo;
TimeInForce _default_time_in_force;
@@ -143,17 +146,22 @@ namespace mbts.spark {
_accounts.SyncWithDictionary(MappedDictionary.create(acc_map, account_factory));
_try_select_desired_account();
}),
ObservableAutoWrapper.connect_item_hooks(favorite_algos_vm.items, connect_favorite_algo),
ObservableAutoWrapper.connect_item_hooks(favorite_algos_vm.items, observe_prop_changes),
_model.algo_model.definitions.OnDispatcher().Subscribe(update => {
AlgoCollectionHelper.update_persisted_definitions(_algo_definitions, update, algo_factory);
_try_select_desired_algo();
}),
ObservableAutoWrapper.connect_item_hooks(fair_value_line_settings_vm.items, item => {
_update.execute();
var prop_changes_sub = observe_prop_changes(item);
return Disposable.Create(_update.execute, prop_changes_sub.Dispose);
})
) { dispose_resources };
// local methods
void on_font_size_changed(double oldval, double newval) => _row_height.refresh();
void on_prop_changed(object sender, PropertyChangedEventArgs e) => _update.execute();
void on_favorite_algo_items_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) => _update.execute();
IDisposable connect_favorite_algo(FavoriteAlgoItem item) {
IDisposable observe_prop_changes(INotifyPropertyChanged item) {
item.PropertyChanged += on_prop_changed;
return Disposable.Create(() => item.PropertyChanged -= on_prop_changed);
}
@@ -253,6 +261,14 @@ namespace mbts.spark {
public double row_height => _row_height.Value;
public bool is_synthetic => _security.ContractCase == Security.ContractOneofCase.Synthetic;
public IReadOnlyDictionary<uint, SecurityMD> security_map {
get => _security_map;
set {
Set(ref _security_map, value);
fair_value_line_settings_vm.security_map = value;
}
}
public IEnumerable<LadderColumnSettingsVM> column_items {
get {
yield return _orders;
@@ -290,6 +306,9 @@ namespace mbts.spark {
}
}
public FairValueLineSettingsVM fair_value_line_settings_vm { get; } = new
FairValueLineSettingsVM();
public IEnumerable order_entry_panel_items {
get {
yield return _zoom_slider_visbility;
@@ -388,6 +407,14 @@ namespace mbts.spark {
_session_low_mkt_line.assign_from(_current.session_low_line);
_session_high_mkt_line.assign_from(_current.session_high_line);
_session_range_fill.assign_from(_current.session_range_fill);
// fair value lines
fair_value_line_settings_vm.items.SetItems(
_current.fair_value_lines.Select(fvl => {
var fvl_vm = new FairValueLineItemSettingsVM();
fvl_vm.assign_from(fvl);
fvl_vm.selected_security_key = fvl.security_key;
return fvl_vm;
}));
// left-panel (defaults)
default_time_in_force = settings.default_time_in_force;
// - account
@@ -476,6 +503,11 @@ namespace mbts.spark {
clone.session_low_line = _session_low_mkt_line.get_settings();
clone.session_high_line = _session_high_mkt_line.get_settings();
clone.session_range_fill = _session_range_fill.get_settings();
// fair value lines
clone.fair_value_lines = fair_value_line_settings_vm.items
.Select(fvl => fvl.create())
.Where(fvl => fvl.security_key != 0)
.ToList();
// left-panel price items
clone.panel_price_point_settings = new LadderPanelPricePointSettings {
day_change = _day_change.create(),
@@ -6,6 +6,7 @@ using bts.shell;
using bts.spark;
using bts.utils;
using mbts.co2;
using mbts.collections;
using mbts.spark.utilities;
using mbts.ui;
using mbts.ui.shell;
@@ -47,6 +48,8 @@ namespace mbts.spark {
_show_zoom,
_show_status_message;
readonly PropertyAutoWrapper<LadderSettings, Brush> _bid_background, _bid_foreground, _ask_background, _ask_foreground;
readonly ObservableCollection<FairValueLine> _fair_value_line_inputs =
new ObservableCollection<FairValueLine>();
double
_position,
_day_position,
@@ -62,6 +65,7 @@ namespace mbts.spark {
Dictionary<double, LadderOrderVM> _slot_price_vs_orders;
ImmutableSortedDictionary<double, LadderOrderVM> _order_price_index;
IReadOnlyDictionary<uint, OrderSecurity> _cache = DictionaryHelper.empty<uint, OrderSecurity>();
IReadOnlyDictionary<uint, SecurityMD> _security_map = DictionaryHelper.empty<uint, SecurityMD>();
ImmutableDictionary<AlgoKey, LadderFavoriteAlgoItem> _favorite_algo_map = ImmutableDictionary<AlgoKey, LadderFavoriteAlgoItem>.Empty;
ContractSpecificationImmutable? _spec;
@@ -170,6 +174,12 @@ namespace mbts.spark {
_left_panel_width.set(s.order_entry_panel_initial_width);
_zoom_factor.set(s.zoom_factor);
RaisePropertyChanged(nameof(day_change_font_color), nameof(day_change_background_color));
// fair value lines
var new_fvls = s.fair_value_lines
.DistinctOn(fvl => fvl.security_key)
.OrderBy(fvl => fvl.security_key)
.ToList();
_fair_value_line_inputs.sync_with(new_fvls);
}
};
PropertyAutoWrapper<LadderSettings, bool> bool_prop(string name, Func<LadderSettings, bool> get_bool) =>
@@ -201,6 +211,11 @@ namespace mbts.spark {
settings.OnDispatcher().Subscribe(settings_observer),
get_order_properties_editor_hooks(),
bus.subscribe(SparkTags.LogActivity).OnDispatcher().Subscribe(status_update),
bus.subscribe(SparkTags.SecuritiesTag).OnDispatcher().Subscribe(on_security_map),
ObservableAutoWrapper.connect(
_fair_value_line_inputs,
fair_value_lines,
fvl => new FairValueLineVM(fvl, _find_sec_md(fvl.security_key))),
orders_source.OnDispatcher().Subscribe(tup => {
// Here we manage N orders to 1 price slot in the ladder
Dictionary<double, HashSet<uint>> orders_used_in_this_update = new Dictionary<double, HashSet<uint>>(_equality);
@@ -255,6 +270,15 @@ namespace mbts.spark {
RaisePropertyChanged(nameof(position_display_text));
}));
}
void on_security_map(IReadOnlyDictionary<uint, SecurityMD> security_map) {
_security_map = security_map;
foreach (var fvl_vm in fair_value_lines) {
if (fvl_vm.sec_md.HasValue) {
continue;
}
fvl_vm.sec_md = _find_sec_md(fvl_vm.sec_id);
}
}
}
public IBus bus => _bus;
@@ -404,6 +428,10 @@ namespace mbts.spark {
return rv ?? "";
}
}
public ObservableCollection<FairValueLineVM> fair_value_lines { get; } =
new ObservableCollection<FairValueLineVM>();
//public double window_height { get => _window_height.Value; set => _window_height.set(value); }
//public double window_width { get => _window_width.Value; set => _window_width.set(value); }
public uint orders_column_width { get => _orders_column_width.Value; set => _orders_column_width.set(value); }
@@ -678,5 +706,12 @@ namespace mbts.spark {
_update_header();
on_tick?.Invoke();
}
SecurityMD? _find_sec_md(uint sec_key) {
if (_security_map.TryGetValue(sec_key, out var sec_md)) {
return sec_md;
}
return null;
}
}
}
@@ -0,0 +1,127 @@
<UserControl
x:Class="mbts.ui.spark.FairValueLineSettingsView"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mbts="clr-namespace:mbts"
xmlns:sp="clr-namespace:mbts.spark"
xmlns:u="clr-namespace:mbts.ui"
xmlns:c="clr-namespace:mbts.ui.controls"
xmlns:cv="clr-namespace:mbts.ui.converters"
xmlns:stg="clr-namespace:mbts.ui.settings"
xmlns:usp="clr-namespace:mbts.ui.spark"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
>
<UserControl.Resources>
<Thickness x:Key="CellPadding">10,6</Thickness>
<Style x:Key="DisabledColumnHeader" TargetType="GridViewColumnHeader">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{x:Static u:BTSColors.header_brush}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<c:DIYGrid
Grid.Row="0"
Grid.IsSharedSizeScope="True"
BorderBrush="Black"
BorderThickness="1"
Rows="{Binding items}"
RowsHorizontalScrollBarVisibility="Collapsed"
SelectionMode="Single"
>
<c:DIYGrid.Columns>
<c:DIYGridColumnCollection>
<usp:FairValueLineSettingsColumn key="Delete" HeaderContainerStyle="{StaticResource DisabledColumnHeader}" Width="23" is_visible="True"/>
<usp:FairValueLineSettingsColumn key="Security" Header="Security" Width="130" is_visible="True"/>
<usp:FairValueLineSettingsColumn key="Show" Header="Show" Width="40" is_visible="True"/>
<usp:FairValueLineSettingsColumn key="AutoRefresh" Header="Auto Refresh" Width="80" is_visible="True"/>
<usp:FairValueLineSettingsColumn key="Color" Header="Color" Width="80" is_visible="True"/>
<usp:FairValueLineSettingsColumn key="PriceType" Header="Type" Width="80" is_visible="True"/>
</c:DIYGridColumnCollection>
</c:DIYGrid.Columns>
<c:DIYGrid.RowTemplate>
<DataTemplate DataType="{x:Type sp:FairValueLineItemSettingsVM}">
<Grid c:DIYGrid.SyncWithColumnGeometry="True">
<!--Delete-->
<Button
c:DIYGrid.ColumnKey="Delete"
HorizontalAlignment="Center"
Command="{Binding DataContext.remove_item_cmd,
RelativeSource={RelativeSource AncestorType=usp:FairValueLineSettingsView}}"
CommandParameter="{Binding}"
Style="{StaticResource RoundCloseButton}"
ToolTip="Delete"
/>
<!--Security-->
<c:ContractPickerPopup
c:DIYGrid.ColumnKey="Security"
Grid.Column="0"
Margin="{StaticResource CellPadding}"
CloseOnOK="True"
CloseOnCancel="True"
IsEditMode="False"
MaxWidth="180"
SecurityMap="{Binding DataContext.security_map,
RelativeSource={RelativeSource AncestorType=usp:FairValueLineSettingsView}}"
SelectedSecurityKey="{Binding selected_security_key}"
Header="{Binding SelectedSecurity,
RelativeSource={RelativeSource Self},
Converter={StaticResource SelectedSecurityTextConverter}}"
/>
<!--Show-->
<CheckBox
c:DIYGrid.ColumnKey="Show"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsChecked="{Binding show}"
/>
<!--AutoRefresh-->
<CheckBox
c:DIYGrid.ColumnKey="AutoRefresh"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsChecked="{Binding auto_refresh}"
/>
<!--Color-->
<c:ColorPickerPopup
c:DIYGrid.ColumnKey="Color"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="{StaticResource CellPadding}"
Palettes="{Binding color_palettes}"
SelectedColor="{Binding color}"
/>
<!--PriceType-->
<ComboBox
c:DIYGrid.ColumnKey="PriceType"
Margin="{StaticResource CellPadding}"
ItemsSource="{Binding price_types}"
SelectedItem="{Binding selected_price_type}"
/>
<Rectangle Grid.Column="0" HorizontalAlignment="Right" Width="1" Fill="Gray"/>
<Rectangle Grid.Column="1" HorizontalAlignment="Right" Width="1" Fill="Gray"/>
<Rectangle Grid.Column="2" HorizontalAlignment="Right" Width="1" Fill="Gray"/>
<Rectangle Grid.Column="3" HorizontalAlignment="Right" Width="1" Fill="Gray"/>
<Rectangle Grid.Column="4" HorizontalAlignment="Right" Width="1" Fill="Gray"/>
</Grid>
</DataTemplate>
</c:DIYGrid.RowTemplate>
</c:DIYGrid>
<TextBlock Grid.Row="1" HorizontalAlignment="Left" Margin="4,8">
<Hyperlink Command="{Binding add_item_cmd}">
Click to Add Item
</Hyperlink>
</TextBlock>
</Grid>
</UserControl>
@@ -0,0 +1,40 @@
using mbts.ui.controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace mbts.ui.spark {
/// <summary>
/// Interaction logic for FairValueLineSettingsView.xaml
/// </summary>
partial class FairValueLineSettingsView : UserControl {
public FairValueLineSettingsView() =>
InitializeComponent();
public enum Columns {
None = 0,
Delete,
Security,
Show,
AutoRefresh,
Color,
PriceType
}
}
class FairValueLineSettingsColumn : DIYGrid.ColumnBase<FairValueLineSettingsView.Columns> {
protected override void on_key_initialized(FairValueLineSettingsView.Columns key) =>
id = key.ToString();
}
}
@@ -57,7 +57,7 @@ namespace mbts.spark {
readonly RefValueContainer<IEnumerable<VolumeAtPriceLevelImmutable>> _volume_container =
new RefValueContainer<IEnumerable<VolumeAtPriceLevelImmutable>>();
IDisposable _settings_sub, _volume_sub, _tick_sub, _vm_sub;
IDisposable _settings_sub, _volume_sub, _tick_sub, _fair_value_lines_sub, _vm_sub;
ScrollViewer _scrollViewer;
LadderSettings _settings;
LadderVM _vm;
@@ -832,6 +832,7 @@ namespace mbts.spark {
_refresh_bid_mkt_break();
_refresh_ask_mkt_break();
_refresh_mid_mkt_break();
_refresh_fair_value_lines(true);
}
void _on_vm_disposed(bool obj) =>
@@ -841,6 +842,7 @@ namespace mbts.spark {
Disposable.dispose(ref _settings_sub);
Disposable.dispose(ref _volume_sub);
Disposable.dispose(ref _tick_sub);
Disposable.dispose(ref _fair_value_lines_sub);
if (_vm != null)
_vm.OnDisposed -= _on_vm_disposed;
}
@@ -897,6 +899,7 @@ namespace mbts.spark {
_refresh_bid_mkt_break();
_refresh_ask_mkt_break();
_refresh_mid_mkt_break();
_refresh_fair_value_lines(true);
_refresh_session_low_line();
_refresh_session_high_line();
_refresh_session_range();
@@ -909,6 +912,7 @@ namespace mbts.spark {
_refresh_ask_mkt_break();
if (_mkt_break_lines.mid_dirty)
_refresh_mid_mkt_break();
_refresh_fair_value_lines(false);
if (_mkt_break_lines.session_low_dirty)
_refresh_session_low_line();
if (_mkt_break_lines.session_high_dirty)
@@ -962,6 +966,14 @@ namespace mbts.spark {
_mkt_break_lines.mid,
_settings.mid_break_line.color);
void _refresh_fair_value_lines(bool force) {
foreach (var fvl in _mkt_break_lines.fair_value_line_views) {
if (force || fvl.is_dirty) {
_render_mkt_break(fvl.vis, fvl.price_view, fvl.color);
}
}
}
void _refresh_session_low_line() {
if (_settings.session_low_line.show && _mkt_break_lines.low_render_index.HasValue)
_render_session_line(_session_low_vis, _mkt_break_lines.low_render_index.Value, _settings.session_low_line.color);
@@ -1133,6 +1145,7 @@ namespace mbts.spark {
_refresh_bid_mkt_break();
_refresh_ask_mkt_break();
_refresh_mid_mkt_break();
_refresh_fair_value_lines(true);
_refresh_session_low_line();
_refresh_session_high_line();
_refresh_session_range();
@@ -1146,39 +1159,24 @@ namespace mbts.spark {
prices != null && prices.Length > 0 ? prices[0].price : double.NaN;
double _get_bid_market_break() {
var raw_bid_break = _get_bid_market_break_raw();
return _normalize_price(raw_bid_break);
double best_bid = _get_top_price(_bids);
double best_ask = _get_top_price(_asks);
return LadderPriceLineViewAdapter.bid_line(best_bid, best_ask, _vm.settlement, _spec);
}
double _normalize_price(double price) =>
TickUtils.normalize_price(_spec, price);
double _get_bid_market_break_raw() {
double best_bid = _get_top_price(_bids);
double best_ask = _get_top_price(_asks);
return double.IsNaN(best_bid) ?
double.IsNaN(best_ask) ? _vm.settlement : _spec.tickdown(best_ask) :
best_bid;
}
double _get_ask_market_break() {
var raw_ask_break = _get_ask_market_break_raw();
return _normalize_price(raw_ask_break);
}
double _get_ask_market_break_raw() {
double best_bid = _get_top_price(_bids);
double best_ask = _get_top_price(_asks);
return double.IsNaN(best_ask) ?
double.IsNaN(best_bid) ? _vm.settlement : best_bid :
_spec.tickdown(best_ask);
return LadderPriceLineViewAdapter.ask_line(best_bid, best_ask, _vm.settlement, _spec);
}
double _get_mid_market_break() {
double best_bid = _get_top_price(_bids);
double best_ask = _get_top_price(_asks);
return double.IsNaN(best_bid) ?
double.IsNaN(best_ask) ? _vm.settlement : _spec.tickdown(best_ask) :
double.IsNaN(best_ask) ? best_bid : TickUtils.mid_tick(_spec, best_bid, best_ask);
return LadderPriceLineViewAdapter.mid_line(best_bid, best_ask, _vm.settlement, _spec);
}
double _get_session_low() => _normalize_price(_get_session_low_raw());
@@ -1229,6 +1227,8 @@ namespace mbts.spark {
if (prev_row_height != _settings.row_height)
_reset_height();
_price_dirty = _settings.price_column.show;
Disposable.dispose(ref _fair_value_lines_sub);
_mkt_break_lines.fair_value_line_views.Clear();
// Clear and re-add the columns to the viewer to ensure offset/visibility is correct
_visualHost.Clear();
if (LadderSettings.mimic_tt) {
@@ -1271,6 +1271,15 @@ namespace mbts.spark {
_visualHost.AddVisualChild(_mid_mkt_break_vis);
_visualHost.AddVisualChild(_ask_mkt_break_vis);
_visualHost.AddVisualChild(_bid_mkt_break_vis);
_fair_value_lines_sub = ui.utility.ObservableAutoWrapper.connect(
_vm.fair_value_lines,
_mkt_break_lines.fair_value_line_views,
vm => {
var with_vis = new FairValueLineWithVis(vm);
_visualHost.AddVisualChild(with_vis.vis);
return with_vis;
},
with_vis => _visualHost.RemoveVisualChild(with_vis.vis));
_visualHost.AddVisualChild(_session_low_vis);
_visualHost.AddVisualChild(_session_high_vis);
if (!LadderSettings.mimic_tt)
@@ -1360,6 +1369,24 @@ namespace mbts.spark {
!(x == y);
}
class FairValueLineWithVis {
readonly FairValueLineVM _vm;
double _price_view = double.NaN;
public FairValueLineWithVis(FairValueLineVM vm) =>
_vm = vm ?? throw new ArgumentNullException(nameof(vm));
public DrawingVisual vis { get; } = new DrawingVisual();
public double price_view => _price_view;
public uint color => _vm.settings.color;
public bool is_dirty { get; private set; }
public void refresh(bool update_frozen) {
_vm.refresh(update_frozen);
is_dirty = ConvertUtils.update_value_type(ref _price_view, _vm.price_view);
}
}
// This class represents interesting price points as they should be rendered on the LadderGridHost
// Note: The values contained here do NOT necessarily represent true data, as they will be NaN/null if their respective visual is hidden in LadderSettings
class MarketBreakLines {
@@ -1422,6 +1449,9 @@ namespace mbts.spark {
}
}
public ObservableCollection<FairValueLineWithVis> fair_value_line_views { get; } =
new ObservableCollection<FairValueLineWithVis>();
int _get_session_range_size() =>
_owner._spec.tickdiff(_session_high, _session_low) ?? 0;
@@ -1440,6 +1470,9 @@ namespace mbts.spark {
mid_dirty = ConvertUtils.update_value_type(ref _mid, _settings.mid_break_line.show ? _owner._get_mid_market_break() : double.NaN);
session_low_dirty = ConvertUtils.update_value_type(ref _session_low, (_settings.session_low_line.show || _settings.session_range_fill.show) ? _owner._get_session_low() : double.NaN);
session_high_dirty = ConvertUtils.update_value_type(ref _session_high, (_settings.session_high_line.show || _settings.session_range_fill.show) ? _owner._get_session_high() : double.NaN);
foreach (var fvlv in fair_value_line_views) {
fvlv.refresh(update_frozen);
}
if (session_low_dirty)
_low_index = null;
if (session_high_dirty)
@@ -0,0 +1,60 @@
using bts.api;
namespace mbts.spark {
class LadderPriceLineViewAdapter {
public static double bid_line(
double bid, double ask, double settlement, ContractSpecificationImmutable? spec) {
return TickUtils.normalize_price(spec, impl());
double impl() {
if (!double.IsNaN(bid)) {
return bid;
}
if (!double.IsNaN(ask)) {
return _try_tick_down(spec, ask);
}
return settlement;
}
}
public static double ask_line(
double bid, double ask, double settlement, ContractSpecificationImmutable? spec) {
return TickUtils.normalize_price(spec, impl());
double impl() {
if (!double.IsNaN(ask)) {
return _try_tick_down(spec, ask);
}
if (!double.IsNaN(bid)) {
return bid;
}
return settlement;
}
}
public static double mid_line(
double bid, double ask, double settlement, ContractSpecificationImmutable? spec) {
return TickUtils.normalize_price(spec, impl());
double impl() {
if (double.IsNaN(bid)) {
if (double.IsNaN(ask)) {
return settlement;
}
return _try_tick_down(spec, ask);
}
if (double.IsNaN(ask)) {
return bid;
}
if (spec.HasValue) {
return TickUtils.mid_tick(spec.Value, bid, ask);
}
return bid;
}
}
static double _try_tick_down(ContractSpecificationImmutable? spec, double value) {
if (spec.HasValue) {
return spec.Value.tickdown(value);
}
return value;
}
}
}
@@ -899,6 +899,9 @@
</ItemsControl>
</Grid>
</TabItem>
<TabItem Header="Fair Value Lines" VerticalAlignment="Stretch">
<usp:FairValueLineSettingsView HorizontalAlignment="Left" MaxHeight="300" DataContext="{Binding fair_value_line_settings_vm}"/>
</TabItem>
<!-- Market Price & Size Tab -->
<TabItem Header="Market Price and Size Display">
<Grid Margin="6" Grid.IsSharedSizeScope="True">
@@ -6,10 +6,12 @@ using System.Windows.Data;
namespace mbts.ui.converters {
[ValueConversion(typeof(SecurityTuple), typeof(string))]
public class SecurityDisplayTextConverter : IValueConverter {
public string TextForNull { get; set; } = "Unknown";
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
if (value is Security s)
return SecurityFormatter.format(s);
return value?.ToString() ?? "Unknown";
return value?.ToString() ?? TextForNull;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotImplementedException();
}
@@ -28,6 +28,7 @@
<cv:CellPathConverter x:Key="CellPathConverter" />
<cv:CellKeyConverter x:Key="CellKeyConverter" />
<cv:SecurityDisplayTextConverter x:Key="SecurityTextConverter"/>
<cv:SecurityDisplayTextConverter x:Key="SelectedSecurityTextConverter" TextForNull="(None)"/>
<cv:NumericSignBrushConverter x:Key="NumericSignBrushConverter" />
<cv:TickDisplayTextConverter x:Key="TickTextConverter" />
<cv:DoubleTextConverter x:Key="DoubleTextConverter" />
@@ -23,11 +23,13 @@ namespace mbts.ui.controls {
readonly PropertyUpdateGate _selection_sync_gate = new PropertyUpdateGate();
IReadOnlyDictionary<uint, SecurityMD> _cached_security_map = DictionaryHelper.empty<uint, SecurityMD>();
// The security key of the most recently changed property among
// SelectedSecurity, SelectedSecurityMD, and SelectedSecurityKey
uint? _last_selected_sec_key = null;
ContractPickerPopupController _controller;
bool _allow_empty, _is_lazy;
public ContractPickerPopup() {
SetCurrentValue(SecurityMapProperty, new Dictionary<uint, SecurityMD>(0));
var sec_map_source = Observable.Create<IReadOnlyDictionary<uint, SecurityMD>>(o => {
try_notify();
_security_map_changed += on_security_map_changed;
@@ -50,6 +52,9 @@ namespace mbts.ui.controls {
}
});
_controller = new ContractPickerPopupController(this, new ContractPickerModel(sec_map_source, true, null));
// This has to be set after _controller is initialized (because it causes a call to the IsEditMode getter,
// which assumes _controller is non-null)
SetCurrentValue(SecurityMapProperty, new Dictionary<uint, SecurityMD>(0));
InitializeComponent();
DataContextChanged += (s, e) => {
// - unhooking from oldval must co-incide with hooking to newval.
@@ -91,6 +96,8 @@ namespace mbts.ui.controls {
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
(o, v) => {
o._cached_security_map = v;
o._selection_sync_gate.try_update(() => o._sync_selection_props(
o.SelectedSecurityMD, o.SelectedSecurity, o.SelectedSecurityKey, o._last_selected_sec_key));
o._security_map_changed?.Invoke(v);
},
(o, v) => v ?? new Dictionary<uint, SecurityMD>());
@@ -125,6 +132,7 @@ namespace mbts.ui.controls {
}
void _sync_selection_props(SecurityMD? curr_sec_md, SecurityImmutable? curr_sec, uint? curr_sec_key, uint? target_sec_key) {
_last_selected_sec_key = target_sec_key;
if (curr_sec_key != target_sec_key) {
SetCurrentValue(SelectedSecurityKeyProperty, target_sec_key);
}
@@ -245,6 +245,10 @@ namespace mbts.spark {
return ticks.HasValue ? spec.tickup(0, ticks.Value) : price;
}
public static double normalize_price(ContractSpecificationImmutable? spec, double price) {
return spec.HasValue ? normalize_price(spec.Value, price) : price;
}
public static uint fit_ticks_per_row_to_dollars(ContractSpecificationImmutable spec, uint ticks_per_row) =>
_fit_ticks_per_row_to_dollars(spec, ticks_per_row) ?? 1;
+7 -2
View File
@@ -32,11 +32,17 @@ valid_message_types = {
def print_headers():
# From https://www.theice.com/publicdocs/futures_us/exchange_notices/ICE_Advisory_0113_009.pdf
line_to_write = ",11,37,60,55,55,167,202,201,54,38,210,40,44,99,440,439,9175,9195,9208,9139,115 (left),115 (right),116 (right),116 (left),144 (left),59"
with open (args.output_file, 'w') as the_file:
the_file.write(line_to_write)
the_file.write("\n")
line_to_write = "Active Date,Cl Ord ID,OrderID,Transact Time,Symbol,Symbol,SecurityType,Stk Prc,P/C,Side,OrderQty,Max Show,OrdType,\
Price,StopPx,Clearing Account,Clearing Firm,Order State,AccountCode,CTI Code,Originator User ID,OnBehalfOfCompID,\
OnBehalfOfCompID,On Behalf Of Sub ID,On Behalf Of Sub ID,On Behalf Of Location ID,Time In Force"
with open (args.output_file, 'w') as the_file:
with open (args.output_file, 'a') as the_file:
the_file.write(line_to_write)
the_file.write("\n")
@@ -49,7 +55,6 @@ Routing Trdr,Routing Grp,Time In Force"
the_file.write(line_to_write)
the_file.write("\n")
def getter(field_name):
def result(parsed_fix_record):
if field_name in parsed_fix_record:
+1 -1
View File
@@ -56,7 +56,7 @@ for SESSION in $(ls /sparkdata/data/{ilink3,jetfix}/); do
ILINK_TYPE="ilink3"
LOG_NAME="log"
elif [[ $SESSION == "ice_"* ]]; then
SESSION_DAY=$(date -d "$DATE 2 days ago" +%Y-%m-%d)
SESSION_DAY=$(date -d "$DATE 1 days ago" +%Y-%m-%d)
AUDIT_SCRIPT="audit_ice.py"
ILINK_TYPE="jetfix"
LOG_NAME="fix"
+3 -1
View File
@@ -135,7 +135,9 @@ else ()
-ldl
-static-libgcc
-static-libstdc++
-pthread)
-pthread)
install(TARGETS libspark DESTINATION bin)
endif()
if (WIN32)
+1 -1
View File
@@ -319,7 +319,7 @@ if __name__ == "__main__":
if DEBUG:
for f in response.file:
print f.content
print (f.content)
else:
output = response.SerializeToString()
sys.stdout.write(output)
+35 -41
View File
@@ -9,33 +9,28 @@ namespace config {
namespace internal {
HTTPServer::HTTPServer()
: _io_service(),
_acceptor(_io_service, tcp::endpoint(boost::asio::ip::address_v4::loopback(), 0)),
_cur_socket(),
_request_response_pairs(),
_thread(),
_done(false)
{
}
: _io_service(),
_acceptor(
_io_service,
tcp::endpoint(boost::asio::ip::address_v4::loopback(), 0)),
_cur_socket(), _request_response_pairs(), _thread(), _done(false) {}
unsigned int HTTPServer::port() const
{
unsigned int HTTPServer::port() const {
return _acceptor.local_endpoint().port();
}
void HTTPServer::add_response(const std::string& path, const std::string& response, const std::string& content)
{
void HTTPServer::add_response(
const std::string &path,
const std::string &response,
const std::string &content) {
_request_response_pairs[path] = response + content;
}
void HTTPServer::start()
{
void HTTPServer::start() {
_thread.reset(new boost::thread(boost::bind(&HTTPServer::worker, this)));
}
void HTTPServer::stop()
{
void HTTPServer::stop() {
_done = true;
_io_service.stop();
@@ -45,55 +40,52 @@ void HTTPServer::stop()
}
}
void HTTPServer::worker()
{
void HTTPServer::worker() {
start_accept();
_io_service.run();
}
void HTTPServer::start_accept()
{
void HTTPServer::start_accept() {
_cur_socket.reset(new boost::asio::ip::tcp::socket(_io_service));
_acceptor.async_accept(*_cur_socket.get(), boost::bind(&HTTPServer::handle_accept, this, _cur_socket.get(), boost::asio::placeholders::error));
_acceptor.async_accept(
*_cur_socket.get(),
boost::bind(
&HTTPServer::handle_accept, this, _cur_socket.get(),
boost::asio::placeholders::error));
}
void HTTPServer::handle_accept(boost::asio::ip::tcp::socket* socket, const boost::system::error_code& error)
{
if (!error)
{
void HTTPServer::handle_accept(
boost::asio::ip::tcp::socket *socket,
const boost::system::error_code &error) {
if (!error) {
handle_connect(socket);
}
start_accept();
}
void HTTPServer::handle_connect(boost::asio::ip::tcp::socket* socket)
{
void HTTPServer::handle_connect(boost::asio::ip::tcp::socket *socket) {
boost::asio::streambuf buffer;
size_t size = boost::asio::read_until(*socket, buffer, "\r\n\r\n");
std::string request(size, 0);
buffer.sgetn(&request[0], size);
size_t start = request.find("GET ") + 4;
size_t end = request.find(" HTTP/1.1\r\n");
size_t url_args = request.find("?");
if (url_args != std::string::npos)
end = std::min(end, url_args);
std::string request_path = request.substr(start, end-start);
std::string request_path = request.substr(start, end - start);
std::map<std::string, std::string>::iterator request_match =
_request_response_pairs.find(request_path);
if (request_match == _request_response_pairs.end())
{
std::map<std::string, std::string>::iterator request_match =
_request_response_pairs.find(request_path);
if (request_match == _request_response_pairs.end()) {
std::string response = "HTTP/1.0 404 NOT FOUND\r\n"
"Content-Type: text/plain\r\n\r\n"
"not found\r\n";
boost::asio::write(*socket, boost::asio::buffer(response));
}
else
{
} else {
boost::asio::write(*socket, boost::asio::buffer(request_match->second));
}
@@ -102,4 +94,6 @@ void HTTPServer::handle_connect(boost::asio::ip::tcp::socket* socket)
socket->close(ec);
}
}}}
} // namespace internal
} // namespace config
} // namespace bts
+15 -10
View File
@@ -8,6 +8,7 @@
#include <boost/asio/read_until.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/asio/write.hpp>
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/scoped_ptr.hpp>
@@ -17,28 +18,31 @@
#include <boost/asio/connect.hpp>
#include <boost/scoped_ptr.hpp>
#include <string>
#include <map>
#include <string>
namespace bts {
namespace config {
namespace internal {
class HTTPServer
{
public:
class HTTPServer {
public:
HTTPServer();
unsigned int port() const;
void start();
void add_response(const std::string& path, const std::string& response, const std::string& content);
void add_response(
const std::string &path,
const std::string &response,
const std::string &content);
void stop();
private:
private:
void worker();
void start_accept();
void handle_accept(boost::asio::ip::tcp::socket*, const boost::system::error_code& error);
void handle_connect(boost::asio::ip::tcp::socket*);
void handle_accept(
boost::asio::ip::tcp::socket *, const boost::system::error_code &error);
void handle_connect(boost::asio::ip::tcp::socket *);
boost::asio::io_service _io_service;
boost::asio::ip::tcp::acceptor _acceptor;
@@ -46,8 +50,9 @@ private:
std::map<std::string, std::string> _request_response_pairs;
boost::scoped_ptr<boost::thread> _thread;
bool _done;
};
}}} // end namespace
} // namespace internal
} // namespace config
} // namespace bts
#endif
File diff suppressed because it is too large. Load diff
+311 -360
View File
@@ -1,8 +1,8 @@
#include "lib/utils/TempFile.h"
#include "../config.h"
#include "../ConfigurationState.h"
#include "../ConfigurationException.h"
#include "../ConfigurationState.h"
#include "../config.h"
#include "lib/expression/ParserExceptions.h"
#include "lib/utils/bts_assert.h"
#include "lib/utils/is_unittest_environment.h"
@@ -19,9 +19,9 @@
#define URDL_HEADER_ONLY 1
#define URDL_DISALE_SSL 1
#include <urdl/url.hpp>
#include <urdl/test/http_server.hpp>
#include <catch/catch.hpp>
#include <urdl/test/http_server.hpp>
#include <urdl/url.hpp>
using namespace bts::config;
using namespace bts::config::internal;
@@ -31,124 +31,107 @@ using bts::config::test::Foo;
using bts::config::test::FooGroup;
using bts::config::test::StringTable;
namespace bts {
int config_tests = 0;
TEST_CASE("Configuration Tests","[config]") {
TEST_CASE("Configuration Tests", "[config]") {
bts::utils::internal::force_unittest_environment();
SECTION("basic_get_value_test")
{
initialize_for_test(
"Foo { \n"
" rule: \"true\"\n"
" value {\n"
" name: \"Name A\"\n"
" id: 65\n"
" email: \"test@example.com\"\n"
" }\n"
"}\n");
SECTION("basic_get_value_test") {
initialize_for_test("Foo { \n"
" rule: \"true\"\n"
" value {\n"
" name: \"Name A\"\n"
" id: 65\n"
" email: \"test@example.com\"\n"
" }\n"
"}\n");
const Foo& foo = get<Foo>();
const Foo &foo = get<Foo>();
REQUIRE(foo.name() == "Name A");
REQUIRE(foo.id() == 65);
REQUIRE(foo.email().Get(0) == "test@example.com");
}
SECTION("default_value_test")
{
SECTION("default_value_test") {
initialize_for_test(""); // Only loads defaults.conf
// Should load a Foo from testkeys.conf
const Foo& foo = get<Foo>();
const Foo &foo = get<Foo>();
REQUIRE(foo.name() == "Blue Foo"); // from testkeys.proto
REQUIRE(foo.id() == 1234); // from testkeys.proto
REQUIRE(foo.id() == 1234); // from testkeys.proto
REQUIRE(foo.email().size() > 0);
REQUIRE(foo.email().Get(0) == "default@example.com"); // from testkeys.conf
REQUIRE(
foo.email().Get(0) == "default@example.com"); // from testkeys.conf
}
SECTION("default_include_test")
{
SECTION("default_include_test") {
// test defaults.conf with an include
}
SECTION("invalid_key_type_test")
{
SECTION("invalid_key_type_test") {
// Load an initialize with no files - OK all values default
const Foo& foo = get<Foo>(); // OK
const Foo &foo = get<Foo>(); // OK
REQUIRE(foo.name() == "Blue Foo");
bool error = false;
try
{
try {
get<config::test::InvalidMessageType>(); // BAD
}
catch(...)
{
} catch (...) {
error = true;
}
REQUIRE(error == true);
}
SECTION("invalid_config_test2")
{
SECTION("invalid_config_test2") {
utils::TempFile config_b;
*config_b.out() <<
"Foo {\n"
" value { \n"
" name: \"bob\"\n"
" id: 7319 \n"
" }";
*config_b.out() << "Foo {\n"
" value { \n"
" name: \"bob\"\n"
" id: 7319 \n"
" }";
bool error = false;
try
{
try {
initialize_for_test("include: \"" + config_b.path() + "\"", false);
}
catch(const ConfigurationException& err)
{
} catch (const ConfigurationException &err) {
std::string what = err.what();
bts_assert(what.find("Expected identifier.") != std::string::npos);
error = true;
}
REQUIRE(error == true);
}
// Tests that we can load using a File:/// url
// Tests complex value load
SECTION("file_url_test")
{
SECTION("file_url_test") {
utils::TempFile config_a;
utils::TempFile config_b;
*config_a.out() << "include: \"" << config_b.path() << "\"" << std::endl <<
"Foo { \n"
" rule: \"false\"\n"
" value {\n"
" name: \"Name A\"\n"
" id: 65\n"
" email: \"A@bluecg.com\"\n"
" }\n"
"}\n";
*config_a.out() << "include: \"" << config_b.path() << "\"" << std::endl
<< "Foo { \n"
" rule: \"false\"\n"
" value {\n"
" name: \"Name A\"\n"
" id: 65\n"
" email: \"A@bluecg.com\"\n"
" }\n"
"}\n";
*config_b.out() <<
"Foo {\n"
" rule: \"true\"\n"
" value {\n"
" name: \"Name B\"\n"
" id: 66 "
" email: \"A@bluecg.com\" \n"
" }}";
*config_b.out() << "Foo {\n"
" rule: \"true\"\n"
" value {\n"
" name: \"Name B\"\n"
" id: 66 "
" email: \"A@bluecg.com\" \n"
" }}";
// Get key Foo without loading any config files - this will show the default value
// Get key Foo without loading any config files - this will show the
// default value
Foo foo = bts::config::get<Foo>();
REQUIRE(foo.name() == "Blue Foo");
@@ -163,23 +146,20 @@ TEST_CASE("Configuration Tests","[config]") {
REQUIRE(foo.id() == 66);
}
SECTION("http_test")
{
SECTION("http_test") {
HTTPServer server;
std::string port = boost::lexical_cast<std::string>(server.port());
std::string path = "/spark.conf";
std::string response =
"HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
std::string content =
"FooGroup {\n"
" rule: \"true\"\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n";
std::string response = "HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
std::string content = "FooGroup {\n"
" rule: \"true\"\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n";
server.add_response(path, response, content);
server.start();
@@ -190,7 +170,7 @@ TEST_CASE("Configuration Tests","[config]") {
server.stop();
const FooGroup& foogrp = get<FooGroup>();
const FooGroup &foogrp = get<FooGroup>();
REQUIRE(foogrp.group() == "http_group");
REQUIRE(foogrp.foo().name() == "http");
@@ -198,41 +178,41 @@ TEST_CASE("Configuration Tests","[config]") {
REQUIRE(get<System>().config_host() == "127.0.0.1");
}
SECTION("http_folder_test")
{
SECTION("http_folder_test") {
HTTPServer server;
std::string port = boost::lexical_cast<std::string>(server.port());
std::string config_url = "http://localhost:" + port + "/";
std::string response =
"HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
std::string response = "HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
server.add_response("/spark.conf", response, "include: \"" + config_url + "other/\"");
server.add_response("/testkeys.conf", response,
"FooGroup {\n"
" rule: \"true\"\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n");
server.add_response("/other/spark.conf", response,
"Foo {\n"
" rule: \"true\"\n"
" value: {\n"
" name: \"included_value\"\n"
" id: 4096\n"
" }}\n");
server.add_response(
"/spark.conf", response, "include: \"" + config_url + "other/\"");
server.add_response(
"/testkeys.conf", response,
"FooGroup {\n"
" rule: \"true\"\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n");
server.add_response(
"/other/spark.conf", response,
"Foo {\n"
" rule: \"true\"\n"
" value: {\n"
" name: \"included_value\"\n"
" id: 4096\n"
" }}\n");
server.start();
initialize_for_test("include: \"" + config_url + "\"");
server.stop();
const FooGroup& foogrp = get<FooGroup>();
const FooGroup &foogrp = get<FooGroup>();
REQUIRE(foogrp.group() == "http_group");
REQUIRE(foogrp.foo().name() == "http");
@@ -242,44 +222,39 @@ TEST_CASE("Configuration Tests","[config]") {
REQUIRE(get<Foo>().id() == 4096);
}
SECTION("test_rules")
{
initialize_for_test(
"StringTable {\n"
" value { \n"
" entries: [\"foo\", \"bar\", \"baz\"] \n"
" }\n"
" }\n"
"RuleRef { \n"
" # use this rule of StringTable has a cow \n"
" rule: \"'cow' in StringTable.entries\" \n"
" value { \n"
" a_string: \"AAA\"\n"
" a_int: -1\n"
" }\n"
"}\n"
"RuleRef { \n"
" rule: \"'baz' in StringTable.entries\" \n"
" value { \n"
" a_string: \"BBB\"\n"
" a_int: 99\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_int == 789\"\n"
" value {\n"
" name: \"A\"\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_string == 'BBB'\"\n"
" value {\n"
" name: \"B\"\n"
" }\n"
"}\n"
);
SECTION("test_rules") {
initialize_for_test("StringTable {\n"
" value { \n"
" entries: [\"foo\", \"bar\", \"baz\"] \n"
" }\n"
" }\n"
"RuleRef { \n"
" # use this rule of StringTable has a cow \n"
" rule: \"'cow' in StringTable.entries\" \n"
" value { \n"
" a_string: \"AAA\"\n"
" a_int: -1\n"
" }\n"
"}\n"
"RuleRef { \n"
" rule: \"'baz' in StringTable.entries\" \n"
" value { \n"
" a_string: \"BBB\"\n"
" a_int: 99\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_int == 789\"\n"
" value {\n"
" name: \"A\"\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_string == 'BBB'\"\n"
" value {\n"
" name: \"B\"\n"
" }\n"
"}\n");
// What should happen:
// Foo A
@@ -297,286 +272,262 @@ TEST_CASE("Configuration Tests","[config]") {
// success a_string == 'BBB'
// return Foo B
const Foo& foo = get<Foo>();
const Foo &foo = get<Foo>();
REQUIRE(foo.name() == "B");
}
SECTION("test_recursive_rules") {
initialize_for_test("StringTable {\n"
" rule: \"Foo.name == 'foo'\"\n"
" value { \n"
" entries: [\"foo\", \"bar\", \"baz\"] \n"
" }\n"
" }\n"
"RuleRef { \n"
" rule: \"'foo' in StringTable.entries\" \n"
" value { \n"
" a_string: \"AAA\"\n"
" a_int: -1\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_string == 'BBB'\"\n"
" value {\n"
" name: \"foo\"\n"
" }\n"
"}\n");
SECTION("test_recursive_rules")
{
initialize_for_test(
"StringTable {\n"
" rule: \"Foo.name == 'foo'\"\n"
" value { \n"
" entries: [\"foo\", \"bar\", \"baz\"] \n"
" }\n"
" }\n"
"RuleRef { \n"
" rule: \"'foo' in StringTable.entries\" \n"
" value { \n"
" a_string: \"AAA\"\n"
" a_int: -1\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.a_string == 'BBB'\"\n"
" value {\n"
" name: \"foo\"\n"
" }\n"
"}\n"
);
// Foo cannot be queried because RuleRef's rule requests StringTable which requests RuleRef
// Foo cannot be queried because RuleRef's rule requests StringTable which
// requests RuleRef
bool error = false;
try
{
try {
get<Foo>();
}
catch(const expression::RecursivePropertyGetException&)
{
} catch (const expression::RecursivePropertyGetException &) {
error = true;
}
REQUIRE(error);
}
SECTION("test_nested_properties")
{
initialize_for_test(
"RuleRef { \n"
" value { \n"
" nested {\n"
" list_int: [7,8,9] \n"
" nested {\n"
" a_string: 'ABC' \n"
" }\n"
" }\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.nested.nested.a_string == 'ABC' and 9 in RuleRef.nested.list_int\"\n"
" value {\n"
" name: \"foo\"\n"
" }\n"
"}\n"
);
SECTION("test_nested_properties") {
initialize_for_test("RuleRef { \n"
" value { \n"
" nested {\n"
" list_int: [7,8,9] \n"
" nested {\n"
" a_string: 'ABC' \n"
" }\n"
" }\n"
" }\n"
"}\n"
"Foo { \n"
" rule: \"RuleRef.nested.nested.a_string == 'ABC' "
"and 9 in RuleRef.nested.list_int\"\n"
" value {\n"
" name: \"foo\"\n"
" }\n"
"}\n");
REQUIRE(get<Foo>().name() == "foo");
}
SECTION("built_in_properties_test")
{
initialize_for_test(
"Foo { \n"
" rule: \"System.unittest_environment == true \"\n"
" value {\n"
" name: \"unit tests\"\n"
" }\n"
"}\n"
);
SECTION("built_in_properties_test") {
initialize_for_test("Foo { \n"
" rule: \"System.unittest_environment == true \"\n"
" value {\n"
" name: \"unit tests\"\n"
" }\n"
"}\n");
REQUIRE(get<Foo>().name() == "unit tests");
}
SECTION("nonbreaking_space_test")
{
SECTION("nonbreaking_space_test") {
bool parse_error = false;
try
{
try {
initialize_for_test(
"Foo { "
" value {\xA0\xA0 "
" name: \"valid name\""
" \xA0 }"
"} ", false);
}
catch(const bts::config::ConfigurationException)
{
"Foo { "
" value {\xA0\xA0 "
" name: \"valid name\""
" \xA0 }"
"} ",
false);
} catch (const bts::config::ConfigurationException &) {
parse_error = true;
}
REQUIRE(parse_error);
}
SECTION("macro_bool_test")
{
initialize_for_test(
"macro"
"{"
" name: \"bool\""
" expression: \"'c' in ['a', 'b', 'c', 'd']\""
"}"
""
"Foo"
"{"
" rule: \"$bool\""
" value {"
" name: 'good'"
" }"
"}"
""
"Foo"
"{"
" value {"
" name: 'bad'"
" }"
"}"
);
SECTION("macro_bool_test") {
initialize_for_test("macro"
"{"
" name: \"bool\""
" expression: \"'c' in ['a', 'b', 'c', 'd']\""
"}"
""
"Foo"
"{"
" rule: \"$bool\""
" value {"
" name: 'good'"
" }"
"}"
""
"Foo"
"{"
" value {"
" name: 'bad'"
" }"
"}");
REQUIRE(config::get<Foo>().name() == "good");
}
SECTION("macro_list_test")
{
initialize_for_test(
"macro"
"{"
" name: \"list\""
" expression: \"['a', 'b', 'c', 'd']\""
"}"
""
"Foo"
"{"
" rule: \"'a' in $list\""
" value {"
" name: 'good'"
" }"
"}"
""
"Foo"
"{"
" value {"
" name: 'bad'"
" }"
"}"
);
SECTION("macro_list_test") {
initialize_for_test("macro"
"{"
" name: \"list\""
" expression: \"['a', 'b', 'c', 'd']\""
"}"
""
"Foo"
"{"
" rule: \"'a' in $list\""
" value {"
" name: 'good'"
" }"
"}"
""
"Foo"
"{"
" value {"
" name: 'bad'"
" }"
"}");
REQUIRE(config::get<Foo>().name() == "good");
}
SECTION("fallback_test") {
//HTTPServer main;
// HTTPServer main;
HTTPServer fallback;
//std::string main_url = "http://localhost:" + boost::lexical_cast<std::string>(main.port()) + "/";
// std::string main_url = "http://localhost:" +
// boost::lexical_cast<std::string>(main.port()) + "/";
std::string main_url = "http://does_not_exist:12345/";
//main.stop();
std::string fallback_url = "http://127.0.0.1:" + boost::lexical_cast<std::string>(fallback.port()) + "/";
std::string response =
"HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
// main.stop();
std::string fallback_url =
"http://127.0.0.1:" +
boost::lexical_cast<std::string>(fallback.port()) + "/";
std::string response = "HTTP/1.0 200 OK\r\n"
"Content-Type: text/plain\r\n\r\n";
std::string content =
"FooGroup {\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n";
std::string content = "FooGroup {\n"
" value {\n"
" group: \"http_group\"\n"
" foo {\n"
" name: \"http\"\n"
" id: 80\n"
"}}}\n";
fallback.add_response("/spark.conf", response, content);
fallback.start();
initialize_for_test(
"include: '" + main_url + "'\n"
"fallback: '" + fallback_url + "'\n",false
);
"include: '" + main_url +
"'\n"
"fallback: '" +
fallback_url + "'\n",
false);
fallback.stop();
REQUIRE(get<FooGroup>().foo().name() == "http");
REQUIRE(get<FooGroup>().foo().id() == 80);
}
SECTION("macro_definition_order_test") {
// The $is_crusible test
// o2_cme_enabled depends on Foo which has a rule which depends on is_crucible.
// Eager evaluation caused a bug which would cause loading o2_cme_enabled to set is_crucible false. Case 3993
initialize_for_test(
"Foo {"
" rule: '$is_crucible'"
" value { name: 'cme_1u7_cert' }"
"}"
""
"Foo {"
" value { name: '' }"
"}"
""
"macro {"
" name: 'o2_cme_enabled'"
" expression: \"Foo.name != ''\" "
"}"
""
"macro {"
" name: 'is_crucible'"
" expression: 'true'"
"}"
);
// o2_cme_enabled depends on Foo which has a rule which depends on
// is_crucible. Eager evaluation caused a bug which would cause loading
// o2_cme_enabled to set is_crucible false. Case 3993
initialize_for_test("Foo {"
" rule: '$is_crucible'"
" value { name: 'cme_1u7_cert' }"
"}"
""
"Foo {"
" value { name: '' }"
"}"
""
"macro {"
" name: 'o2_cme_enabled'"
" expression: \"Foo.name != ''\" "
"}"
""
"macro {"
" name: 'is_crucible'"
" expression: 'true'"
"}");
REQUIRE(get<Foo>().name() == "cme_1u7_cert");
}
SECTION("repeated_value_order_preserved") {
initialize_for_test(
"Foo {"
" value { name: 'edge-eharding' id: 80 }"
"}"
"StringTable {"
" value {"
" entries: 'http://'"
" entries: @Foo.name"
" entries: ':'"
" entries: @Foo.id"
" entries: '/risk'"
" }"
"}");
initialize_for_test("Foo {"
" value { name: 'edge-eharding' id: 80 }"
"}"
"StringTable {"
" value {"
" entries: 'http://'"
" entries: @Foo.name"
" entries: ':'"
" entries: @Foo.id"
" entries: '/risk'"
" }"
"}");
std::string result;
for (const auto& part : get<StringTable>().entries()) {
for (const auto &part : get<StringTable>().entries()) {
result += part;
}
REQUIRE(result == "http://edge-eharding:80/risk");
}
SECTION("string_concat_test") {
initialize_for_test(
"Ports {\n"
" value { \n"
" config_port: 80 \n"
" }\n"
"}\n"
"RuleRef { \n"
" value { \n"
" a_string: \"localhost\"\n"
" }\n"
"}\n"
"macro{\n"
" name: 'list'\n"
" expression: \"['http://', RuleRef.a_string, ':', Ports.config_port, '/risk']\"\n"
"}"
"StringTable {\n"
"value {\n"
" entries: 'http://'\n"
" entries: @RuleRef.a_string\n"
" entries: ':'\n"
" entries: @Ports.config_port\n"
" entries: '/risk'\n"
"}}\n"
"Foo { \n"
" value {\n"
" name: $list\n"
" url: @StringTable.entries \n"
" }\n"
"}"
);
initialize_for_test("Ports {\n"
" value { \n"
" config_port: 80 \n"
" }\n"
"}\n"
"RuleRef { \n"
" value { \n"
" a_string: \"localhost\"\n"
" }\n"
"}\n"
"macro{\n"
" name: 'list'\n"
" expression: \"['http://', RuleRef.a_string, ':', "
"Ports.config_port, '/risk']\"\n"
"}"
"StringTable {\n"
"value {\n"
" entries: 'http://'\n"
" entries: @RuleRef.a_string\n"
" entries: ':'\n"
" entries: @Ports.config_port\n"
" entries: '/risk'\n"
"}}\n"
"Foo { \n"
" value {\n"
" name: $list\n"
" url: @StringTable.entries \n"
" }\n"
"}");
auto foo = config::get<Foo>();
auto expected = "http://localhost:80/risk";
REQUIRE(foo.name() == expected);
REQUIRE(foo.url() == expected);
}
reset();
}
}
} // namespace bts
+1 -1
View File
@@ -94,7 +94,7 @@ void IL3GW::send_establish() {
msg.putCredentials("", 0);
msg.putFirm(_config.firm);
msg.putTradingSystemName(std::string_view("SPARK"));
msg.putTradingSystemName(std::string_view("Katallage Trading System"));
msg.putTradingSystemVersion(std::string_view("1"));
msg.putTradingSystemVendor(std::string_view("BTS"));
// On primary connection, the expected message sequence number of the next
@@ -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 << '}';
@@ -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
@@ -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 -66
View File
@@ -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);
}
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_MASSCXLREQTYP_H_
#define _ILINKBINARY_MASSCXLREQTYP_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 MassCxlReqTyp
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, MassCxlReqTyp::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, MassCxlReqTyp::Value m)
{
return os << MassCxlReqTyp::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
@@ -164,10 +165,10 @@ private:
}
public:
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(92);
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(123);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(517);
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>(92);
return static_cast<std::uint16_t>(123);
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
@@ -240,7 +242,7 @@ public:
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
{
return static_cast<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 = MassQuote517(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
MassQuote517 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -802,7 +809,7 @@ public:
return *this;
}
#else
MassQuote517 &putSenderID(const std::string& str)
MassQuote517 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1079,7 +1086,7 @@ public:
return *this;
}
#else
MassQuote517 &putLocation(const std::string& str)
MassQuote517 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -1574,6 +1581,11 @@ public:
std::string getReservedAsJsonEscapedString()
{
if (m_actingVersion < 5)
{
return std::string("");
}
std::ostringstream oss;
std::string s = getReservedAsString();
@@ -1636,7 +1648,7 @@ public:
return *this;
}
#else
MassQuote517 &putReserved(const std::string& str)
MassQuote517 &putReserved(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 30)
@@ -1654,6 +1666,310 @@ public:
}
#endif
SBE_NODISCARD static const char *Reserved1MetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "String";
case MetaAttribute::PRESENCE: return "optional";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t reserved1Id() SBE_NOEXCEPT
{
return 5239;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reserved1SinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool reserved1InActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= reserved1SinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reserved1EncodingOffset() SBE_NOEXCEPT
{
return 92;
}
static SBE_CONSTEXPR char reserved1NullValue() SBE_NOEXCEPT
{
return static_cast<char>(0);
}
static SBE_CONSTEXPR char reserved1MinValue() SBE_NOEXCEPT
{
return static_cast<char>(32);
}
static SBE_CONSTEXPR char reserved1MaxValue() SBE_NOEXCEPT
{
return static_cast<char>(126);
}
static SBE_CONSTEXPR std::size_t reserved1EncodingLength() SBE_NOEXCEPT
{
return 30;
}
static SBE_CONSTEXPR std::uint64_t reserved1Length() SBE_NOEXCEPT
{
return 30;
}
SBE_NODISCARD const char *reserved1() const SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return nullptr;
}
return m_buffer + m_offset + 92;
}
SBE_NODISCARD char *reserved1() SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return nullptr;
}
return m_buffer + m_offset + 92;
}
SBE_NODISCARD char reserved1(const std::uint64_t index) const
{
if (index >= 30)
{
throw std::runtime_error("index out of range for reserved1 [E104]");
}
if (m_actingVersion < 8)
{
return static_cast<char>(0);
}
char val;
std::memcpy(&val, m_buffer + m_offset + 92 + (index * 1), sizeof(char));
return (val);
}
MassQuote517 &reserved1(const std::uint64_t index, const char value)
{
if (index >= 30)
{
throw std::runtime_error("index out of range for reserved1 [E105]");
}
char val = (value);
std::memcpy(m_buffer + m_offset + 92 + (index * 1), &val, sizeof(char));
return *this;
}
std::uint64_t getReserved1(char *const dst, const std::uint64_t length) const
{
if (length > 30)
{
throw std::runtime_error("length too large for getReserved1 [E106]");
}
if (m_actingVersion < 8)
{
return 0;
}
std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast<std::size_t>(length));
return length;
}
MassQuote517 &putReserved1(const char *const src) SBE_NOEXCEPT
{
std::memcpy(m_buffer + m_offset + 92, src, sizeof(char) * 30);
return *this;
}
SBE_NODISCARD std::string getReserved1AsString() const
{
const char *buffer = m_buffer + m_offset + 92;
std::size_t length = 0;
for (; length < 30 && *(buffer + length) != '\0'; ++length);
std::string result(buffer, length);
return result;
}
std::string getReserved1AsJsonEscapedString()
{
if (m_actingVersion < 8)
{
return std::string("");
}
std::ostringstream oss;
std::string s = getReserved1AsString();
for (const auto c : s)
{
switch (c)
{
case '"': oss << "\\\""; break;
case '\\': oss << "\\\\"; break;
case '\b': oss << "\\b"; break;
case '\f': oss << "\\f"; break;
case '\n': oss << "\\n"; break;
case '\r': oss << "\\r"; break;
case '\t': oss << "\\t"; break;
default:
if ('\x00' <= c && c <= '\x1f')
{
oss << "\\u" << std::hex << std::setw(4)
<< std::setfill('0') << (int)(c);
}
else
{
oss << c;
}
}
}
return oss.str();
}
#if __cplusplus >= 201703L
SBE_NODISCARD std::string_view getReserved1AsStringView() const SBE_NOEXCEPT
{
const char *buffer = m_buffer + m_offset + 92;
std::size_t length = 0;
for (; length < 30 && *(buffer + length) != '\0'; ++length);
std::string_view result(buffer, length);
return result;
}
#endif
#if __cplusplus >= 201703L
MassQuote517 &putReserved1(const std::string_view str)
{
const std::size_t srcLength = str.length();
if (srcLength > 30)
{
throw std::runtime_error("string too large for putReserved1 [E106]");
}
std::memcpy(m_buffer + m_offset + 92, str.data(), srcLength);
for (std::size_t start = srcLength; start < 30; ++start)
{
m_buffer[m_offset + 92 + start] = 0;
}
return *this;
}
#else
MassQuote517 &putReserved1(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 30)
{
throw std::runtime_error("string too large for putReserved1 [E106]");
}
std::memcpy(m_buffer + m_offset + 92, str.c_str(), srcLength);
for (std::size_t start = srcLength; start < 30; ++start)
{
m_buffer[m_offset + 92 + start] = 0;
}
return *this;
}
#endif
SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "int";
case MetaAttribute::PRESENCE: return "required";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT
{
return 9182;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= quoteEntryOpenSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT
{
return 122;
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT
{
return 1;
}
SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return static_cast<std::uint8_t>(255);
}
std::uint8_t val;
std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t));
return (val);
}
SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const
{
if (m_actingVersion < 8)
{
return BooleanNULL::NULL_VALUE;
}
std::uint8_t val;
std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t));
return BooleanNULL::get((val));
}
MassQuote517 &quoteEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT
{
std::uint8_t val = (value);
std::memcpy(m_buffer + m_offset + 122, &val, sizeof(std::uint8_t));
return *this;
}
class NoQuoteEntries
{
private:
@@ -1780,7 +2096,7 @@ public:
return *this;
}
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
inline std::uint64_t resetCountToIndex()
{
m_count = m_index;
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
@@ -1788,8 +2104,7 @@ public:
return m_count;
}
#if __cplusplus < 201103L
template<class Func> inline void forEach(Func& func)
template<class Func> inline void forEach(Func &&func)
{
while (hasNext())
{
@@ -1798,17 +2113,6 @@ public:
}
}
#else
template<class Func> inline void forEach(Func&& func)
{
while (hasNext())
{
next();
func(*this);
}
}
#endif
SBE_NODISCARD static const char *BidPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
@@ -2331,8 +2635,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NoQuoteEntries writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NoQuoteEntries writer)
{
builder << '{';
builder << R"("BidPx": )";
@@ -2434,11 +2738,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, MassQuote517 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, MassQuote517 _writer)
{
MassQuote517 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
MassQuote517 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "MassQuote517", )";
builder << R"("sbeTemplateId": )";
@@ -2499,19 +2808,29 @@ friend std::basic_ostream<CharT, Traits>& operator << (
builder << '"' <<
writer.getReservedAsJsonEscapedString().c_str() << '"';
builder << ", ";
builder << R"("Reserved1": )";
builder << '"' <<
writer.getReserved1AsJsonEscapedString().c_str() << '"';
builder << ", ";
builder << R"("QuoteEntryOpen": )";
builder << '"' << writer.quoteEntryOpen() << '"';
builder << ", ";
{
bool atLeastOne = false;
builder << R"("NoQuoteEntries": [)";
writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries)
{
if (atLeastOne)
writer.noQuoteEntries().forEach(
[&](NoQuoteEntries &noQuoteEntries)
{
builder << ", ";
}
atLeastOne = true;
builder << noQuoteEntries;
});
if (atLeastOne)
{
builder << ", ";
}
atLeastOne = true;
builder << noQuoteEntries;
});
builder << ']';
}
@@ -2522,10 +2841,11 @@ friend std::basic_ostream<CharT, Traits>& operator << (
void skip()
{
noQuoteEntries().forEach([](NoQuoteEntries e)
auto &noQuoteEntriesGroup { noQuoteEntries() };
while (noQuoteEntriesGroup.hasNext())
{
e.skip();
});
noQuoteEntriesGroup.next().skip();
}
}
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
@@ -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>(350);
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(351);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(545);
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>(350);
return static_cast<std::uint16_t>(351);
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
@@ -240,7 +242,7 @@ public:
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
{
return static_cast<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 = MassQuoteAck545(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
MassQuoteAck545 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -668,7 +675,7 @@ public:
return *this;
}
#else
MassQuoteAck545 &putText(const std::string& str)
MassQuoteAck545 &putText(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 256)
@@ -874,7 +881,7 @@ public:
return *this;
}
#else
MassQuoteAck545 &putSenderID(const std::string& str)
MassQuoteAck545 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1364,7 +1371,7 @@ public:
return *this;
}
#else
MassQuoteAck545 &putLocation(const std::string& str)
MassQuoteAck545 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2264,6 +2271,79 @@ public:
return *this;
}
SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "int";
case MetaAttribute::PRESENCE: return "required";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT
{
return 9182;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= quoteEntryOpenSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT
{
return 350;
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT
{
return 1;
}
SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return static_cast<std::uint8_t>(255);
}
std::uint8_t val;
std::memcpy(&val, m_buffer + m_offset + 350, sizeof(std::uint8_t));
return (val);
}
SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const
{
if (m_actingVersion < 8)
{
return BooleanNULL::NULL_VALUE;
}
std::uint8_t val;
std::memcpy(&val, m_buffer + m_offset + 350, sizeof(std::uint8_t));
return BooleanNULL::get((val));
}
MassQuoteAck545 &quoteEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT
{
std::uint8_t val = (value);
std::memcpy(m_buffer + m_offset + 350, &val, sizeof(std::uint8_t));
return *this;
}
class NoQuoteEntries
{
private:
@@ -2390,7 +2470,7 @@ public:
return *this;
}
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
inline std::uint64_t resetCountToIndex()
{
m_count = m_index;
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
@@ -2398,8 +2478,7 @@ public:
return m_count;
}
#if __cplusplus < 201103L
template<class Func> inline void forEach(Func& func)
template<class Func> inline void forEach(Func &&func)
{
while (hasNext())
{
@@ -2408,17 +2487,6 @@ public:
}
}
#else
template<class Func> inline void forEach(Func&& func)
{
while (hasNext())
{
next();
func(*this);
}
}
#endif
SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
@@ -2705,8 +2773,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NoQuoteEntries writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NoQuoteEntries writer)
{
builder << '{';
builder << R"("QuoteEntryID": )";
@@ -2792,11 +2860,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, MassQuoteAck545 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, MassQuoteAck545 _writer)
{
MassQuoteAck545 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
MassQuoteAck545 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "MassQuoteAck545", )";
builder << R"("sbeTemplateId": )";
@@ -2893,19 +2966,24 @@ friend std::basic_ostream<CharT, Traits>& operator << (
builder << R"("DelayToTime": )";
builder << +writer.delayToTime();
builder << ", ";
builder << R"("QuoteEntryOpen": )";
builder << '"' << writer.quoteEntryOpen() << '"';
builder << ", ";
{
bool atLeastOne = false;
builder << R"("NoQuoteEntries": [)";
writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries)
{
if (atLeastOne)
writer.noQuoteEntries().forEach(
[&](NoQuoteEntries &noQuoteEntries)
{
builder << ", ";
}
atLeastOne = true;
builder << noQuoteEntries;
});
if (atLeastOne)
{
builder << ", ";
}
atLeastOne = true;
builder << noQuoteEntries;
});
builder << ']';
}
@@ -2916,10 +2994,11 @@ friend std::basic_ostream<CharT, Traits>& operator << (
void skip()
{
noQuoteEntries().forEach([](NoQuoteEntries e)
auto &noQuoteEntriesGroup { noQuoteEntries() };
while (noQuoteEntriesGroup.hasNext())
{
e.skip();
});
noQuoteEntriesGroup.next().skip();
}
}
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_MASSSTATUSORDTYP_H_
#define _ILINKBINARY_MASSSTATUSORDTYP_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 MassStatusOrdTyp
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, MassStatusOrdTyp::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, MassStatusOrdTyp::Value m)
{
return os << MassStatusOrdTyp::c_str(m);
}
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_MASSSTATUSREQTYP_H_
#define _ILINKBINARY_MASSSTATUSREQTYP_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 MassStatusReqTyp
@@ -96,6 +32,7 @@ public:
{
Instrument = static_cast<std::uint8_t>(1),
InstrumentGroup = static_cast<std::uint8_t>(3),
AllOrders = static_cast<std::uint8_t>(7),
MarketSegment = static_cast<std::uint8_t>(100),
NULL_VALUE = static_cast<std::uint8_t>(255)
};
@@ -106,6 +43,7 @@ public:
{
case static_cast<std::uint8_t>(1): return Instrument;
case static_cast<std::uint8_t>(3): return InstrumentGroup;
case static_cast<std::uint8_t>(7): return AllOrders;
case static_cast<std::uint8_t>(100): return MarketSegment;
case static_cast<std::uint8_t>(255): return NULL_VALUE;
}
@@ -119,6 +57,7 @@ public:
{
case Instrument: return "Instrument";
case InstrumentGroup: return "InstrumentGroup";
case AllOrders: return "AllOrders";
case MarketSegment: return "MarketSegment";
case NULL_VALUE: return "NULL_VALUE";
}
@@ -127,8 +66,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, MassStatusReqTyp::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, MassStatusReqTyp::Value m)
{
return os << MassStatusReqTyp::c_str(m);
}
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_MASSSTATUSTIF_H_
#define _ILINKBINARY_MASSSTATUSTIF_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 MassStatusTIF
@@ -130,8 +66,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, MassStatusTIF::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, MassStatusTIF::Value m)
{
return os << MassStatusTIF::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 *yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
@@ -478,8 +478,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, MaturityMonthYear writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, MaturityMonthYear writer)
{
builder << '{';
builder << R"("year": )";
@@ -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
@@ -478,8 +478,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, MessageHeader writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, MessageHeader writer)
{
builder << '{';
builder << R"("blockLength": )";
@@ -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>(76);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(500);
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 = Negotiate500(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
Negotiate500 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -776,7 +783,7 @@ public:
return *this;
}
#else
Negotiate500 &putHMACSignature(const std::string& str)
Negotiate500 &putHMACSignature(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 32)
@@ -982,7 +989,7 @@ public:
return *this;
}
#else
Negotiate500 &putAccessKeyID(const std::string& str)
Negotiate500 &putAccessKeyID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1345,7 +1352,7 @@ public:
return *this;
}
#else
Negotiate500 &putSession(const std::string& str)
Negotiate500 &putSession(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 3)
@@ -1551,7 +1558,7 @@ public:
return *this;
}
#else
Negotiate500 &putFirm(const std::string& str)
Negotiate500 &putFirm(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -1732,7 +1739,7 @@ public:
}
#endif
Negotiate500 &putCredentials(const std::string& str)
Negotiate500 &putCredentials(const std::string &str)
{
if (str.length() > 65534)
{
@@ -1753,11 +1760,16 @@ public:
#endif
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, Negotiate500 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, Negotiate500 _writer)
{
Negotiate500 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
Negotiate500 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "Negotiate500", )";
builder << R"("sbeTemplateId": )";
@@ -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>(68);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(502);
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 = NegotiationReject502(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
NegotiationReject502 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -526,7 +533,7 @@ public:
return *this;
}
#else
NegotiationReject502 &putReason(const std::string& str)
NegotiationReject502 &putReason(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 48)
@@ -884,11 +891,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NegotiationReject502 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NegotiationReject502 _writer)
{
NegotiationReject502 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
NegotiationReject502 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "NegotiationReject502", )";
builder << R"("sbeTemplateId": )";
@@ -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>(32);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(501);
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 = NegotiationResponse501(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
NegotiationResponse501 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -1107,7 +1114,7 @@ public:
}
#endif
NegotiationResponse501 &putCredentials(const std::string& str)
NegotiationResponse501 &putCredentials(const std::string &str)
{
if (str.length() > 65534)
{
@@ -1128,11 +1135,16 @@ public:
#endif
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NegotiationResponse501 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NegotiationResponse501 _writer)
{
NegotiationResponse501 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
NegotiationResponse501 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "NegotiationResponse501", )";
builder << R"("sbeTemplateId": )";
@@ -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>(74);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(544);
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 = NewOrderCross544(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
NewOrderCross544 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -802,7 +809,7 @@ public:
return *this;
}
#else
NewOrderCross544 &putSenderID(const std::string& str)
NewOrderCross544 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1572,7 +1579,7 @@ public:
return *this;
}
#else
NewOrderCross544 &putLocation(const std::string& str)
NewOrderCross544 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -1787,7 +1794,7 @@ public:
return *this;
}
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
inline std::uint64_t resetCountToIndex()
{
m_count = m_index;
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
@@ -1795,8 +1802,7 @@ public:
return m_count;
}
#if __cplusplus < 201103L
template<class Func> inline void forEach(Func& func)
template<class Func> inline void forEach(Func &&func)
{
while (hasNext())
{
@@ -1805,17 +1811,6 @@ public:
}
}
#else
template<class Func> inline void forEach(Func&& func)
{
while (hasNext())
{
next();
func(*this);
}
}
#endif
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
@@ -2005,7 +2000,7 @@ public:
return *this;
}
#else
NoSides &putClOrdID(const std::string& str)
NoSides &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -2292,8 +2287,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NoSides writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NoSides writer)
{
builder << '{';
builder << R"("ClOrdID": )";
@@ -2384,11 +2379,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NewOrderCross544 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NewOrderCross544 _writer)
{
NewOrderCross544 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
NewOrderCross544 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "NewOrderCross544", )";
builder << R"("sbeTemplateId": )";
@@ -2440,15 +2440,16 @@ friend std::basic_ostream<CharT, Traits>& operator << (
{
bool atLeastOne = false;
builder << R"("NoSides": [)";
writer.noSides().forEach([&](NoSides& noSides)
{
if (atLeastOne)
writer.noSides().forEach(
[&](NoSides &noSides)
{
builder << ", ";
}
atLeastOne = true;
builder << noSides;
});
if (atLeastOne)
{
builder << ", ";
}
atLeastOne = true;
builder << noSides;
});
builder << ']';
}
@@ -2459,10 +2460,11 @@ friend std::basic_ostream<CharT, Traits>& operator << (
void skip()
{
noSides().forEach([](NoSides e)
auto &noSidesGroup { noSides() };
while (noSidesGroup.hasNext())
{
e.skip();
});
noSidesGroup.next().skip();
}
}
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
@@ -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>(124);
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>(514);
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>(124);
return static_cast<std::uint16_t>(132);
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
@@ -240,7 +242,7 @@ public:
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
{
return static_cast<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 = NewOrderSingle514(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
NewOrderSingle514 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -849,7 +856,7 @@ public:
return *this;
}
#else
NewOrderSingle514 &putSenderID(const std::string& str)
NewOrderSingle514 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1055,7 +1062,7 @@ public:
return *this;
}
#else
NewOrderSingle514 &putClOrdID(const std::string& str)
NewOrderSingle514 &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1521,7 +1528,7 @@ public:
return *this;
}
#else
NewOrderSingle514 &putLocation(const std::string& str)
NewOrderSingle514 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2292,12 +2299,64 @@ public:
return m_discretionPrice;
}
SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "Price";
case MetaAttribute::PRESENCE: return "required";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT
{
return 9562;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= reservationPriceSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT
{
return 124;
}
private:
PRICENULL9 m_reservationPrice;
public:
SBE_NODISCARD PRICENULL9 &reservationPrice()
{
m_reservationPrice.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength);
return m_reservationPrice;
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NewOrderSingle514 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NewOrderSingle514 _writer)
{
NewOrderSingle514 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
NewOrderSingle514 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "NewOrderSingle514", )";
builder << R"("sbeTemplateId": )";
@@ -2400,7 +2459,25 @@ friend std::basic_ostream<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
@@ -167,7 +168,7 @@ public:
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(17);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(513);
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 = NotApplied513(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
NotApplied513 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -615,11 +622,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NotApplied513 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NotApplied513 _writer)
{
NotApplied513 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
NotApplied513 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "NotApplied513", )";
builder << R"("sbeTemplateId": )";
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_OFMOVERRIDEREQ_H_
#define _ILINKBINARY_OFMOVERRIDEREQ_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 OFMOverrideReq
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, OFMOverrideReq::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, OFMOverrideReq::Value m)
{
return os << OFMOverrideReq::c_str(m);
}
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_ORDSTATUSTRD_H_
#define _ILINKBINARY_ORDSTATUSTRD_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 OrdStatusTrd
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, OrdStatusTrd::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, OrdStatusTrd::Value m)
{
return os << OrdStatusTrd::c_str(m);
}
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_ORDSTATUSTRDCXL_H_
#define _ILINKBINARY_ORDSTATUSTRDCXL_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 OrdStatusTrdCxl
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, OrdStatusTrdCxl::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, OrdStatusTrdCxl::Value m)
{
return os << OrdStatusTrdCxl::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>(409);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(535);
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 = OrderCancelReject535(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
OrderCancelReject535 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -668,7 +675,7 @@ public:
return *this;
}
#else
OrderCancelReject535 &putText(const std::string& str)
OrderCancelReject535 &putText(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 256)
@@ -874,7 +881,7 @@ public:
return *this;
}
#else
OrderCancelReject535 &putExecID(const std::string& str)
OrderCancelReject535 &putExecID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 40)
@@ -1080,7 +1087,7 @@ public:
return *this;
}
#else
OrderCancelReject535 &putSenderID(const std::string& str)
OrderCancelReject535 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1286,7 +1293,7 @@ public:
return *this;
}
#else
OrderCancelReject535 &putClOrdID(const std::string& str)
OrderCancelReject535 &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -2097,7 +2104,7 @@ public:
return *this;
}
#else
OrderCancelReject535 &putLocation(const std::string& str)
OrderCancelReject535 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2586,11 +2593,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, OrderCancelReject535 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, OrderCancelReject535 _writer)
{
OrderCancelReject535 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
OrderCancelReject535 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "OrderCancelReject535", )";
builder << R"("sbeTemplateId": )";
@@ -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>(409);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(536);
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 = OrderCancelReplaceReject536(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
OrderCancelReplaceReject536 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -668,7 +675,7 @@ public:
return *this;
}
#else
OrderCancelReplaceReject536 &putText(const std::string& str)
OrderCancelReplaceReject536 &putText(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 256)
@@ -874,7 +881,7 @@ public:
return *this;
}
#else
OrderCancelReplaceReject536 &putExecID(const std::string& str)
OrderCancelReplaceReject536 &putExecID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 40)
@@ -1080,7 +1087,7 @@ public:
return *this;
}
#else
OrderCancelReplaceReject536 &putSenderID(const std::string& str)
OrderCancelReplaceReject536 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1286,7 +1293,7 @@ public:
return *this;
}
#else
OrderCancelReplaceReject536 &putClOrdID(const std::string& str)
OrderCancelReplaceReject536 &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1847,7 +1854,7 @@ public:
return *this;
}
#else
OrderCancelReplaceReject536 &putLocation(const std::string& str)
OrderCancelReplaceReject536 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2586,11 +2593,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, OrderCancelReplaceReject536 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, OrderCancelReplaceReject536 _writer)
{
OrderCancelReplaceReject536 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
OrderCancelReplaceReject536 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "OrderCancelReplaceReject536", )";
builder << R"("sbeTemplateId": )";
@@ -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>(133);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(515);
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 = OrderCancelReplaceRequest515(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
OrderCancelReplaceRequest515 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -849,7 +856,7 @@ public:
return *this;
}
#else
OrderCancelReplaceRequest515 &putSenderID(const std::string& str)
OrderCancelReplaceRequest515 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1055,7 +1062,7 @@ public:
return *this;
}
#else
OrderCancelReplaceRequest515 &putClOrdID(const std::string& str)
OrderCancelReplaceRequest515 &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1592,7 +1599,7 @@ public:
return *this;
}
#else
OrderCancelReplaceRequest515 &putLocation(const std::string& str)
OrderCancelReplaceRequest515 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2427,11 +2434,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, OrderCancelReplaceRequest515 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, OrderCancelReplaceRequest515 _writer)
{
OrderCancelReplaceRequest515 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
OrderCancelReplaceRequest515 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "OrderCancelReplaceRequest515", )";
builder << R"("sbeTemplateId": )";
@@ -2542,7 +2554,14 @@ friend std::basic_ostream<CharT, Traits>& operator << (
builder << ", ";
builder << R"("DiscretionPrice": )";
builder << writer.discretionPrice();
if (writer.discretionPriceInActingVersion())
{
builder << writer.discretionPrice();
}
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>(88);
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(96);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(516);
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>(88);
return static_cast<std::uint16_t>(96);
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
@@ -240,7 +242,7 @@ public:
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
{
return static_cast<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 = OrderCancelRequest516(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
OrderCancelRequest516 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -802,7 +809,7 @@ public:
return *this;
}
#else
OrderCancelRequest516 &putSenderID(const std::string& str)
OrderCancelRequest516 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1008,7 +1015,7 @@ public:
return *this;
}
#else
OrderCancelRequest516 &putClOrdID(const std::string& str)
OrderCancelRequest516 &putClOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1356,7 +1363,7 @@ public:
return *this;
}
#else
OrderCancelRequest516 &putLocation(const std::string& str)
OrderCancelRequest516 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -1571,12 +1578,248 @@ public:
return *this;
}
SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "String";
case MetaAttribute::PRESENCE: return "optional";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT
{
return 9937;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= origOrderUserSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT
{
return 88;
}
static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT
{
return static_cast<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 + 88;
}
SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return nullptr;
}
return m_buffer + m_offset + 88;
}
SBE_NODISCARD char origOrderUser(const std::uint64_t index) const
{
if (index >= 8)
{
throw std::runtime_error("index out of range for origOrderUser [E104]");
}
if (m_actingVersion < 8)
{
return static_cast<char>(0);
}
char val;
std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char));
return (val);
}
OrderCancelRequest516 &origOrderUser(const std::uint64_t index, const char value)
{
if (index >= 8)
{
throw std::runtime_error("index out of range for origOrderUser [E105]");
}
char val = (value);
std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char));
return *this;
}
std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const
{
if (length > 8)
{
throw std::runtime_error("length too large for getOrigOrderUser [E106]");
}
if (m_actingVersion < 8)
{
return 0;
}
std::memcpy(dst, m_buffer + m_offset + 88, sizeof(char) * static_cast<std::size_t>(length));
return length;
}
OrderCancelRequest516 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT
{
std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 8);
return *this;
}
SBE_NODISCARD std::string getOrigOrderUserAsString() const
{
const char *buffer = m_buffer + m_offset + 88;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string result(buffer, length);
return result;
}
std::string getOrigOrderUserAsJsonEscapedString()
{
if (m_actingVersion < 8)
{
return std::string("");
}
std::ostringstream oss;
std::string s = getOrigOrderUserAsString();
for (const auto c : s)
{
switch (c)
{
case '"': oss << "\\\""; break;
case '\\': oss << "\\\\"; break;
case '\b': oss << "\\b"; break;
case '\f': oss << "\\f"; break;
case '\n': oss << "\\n"; break;
case '\r': oss << "\\r"; break;
case '\t': oss << "\\t"; break;
default:
if ('\x00' <= c && c <= '\x1f')
{
oss << "\\u" << std::hex << std::setw(4)
<< std::setfill('0') << (int)(c);
}
else
{
oss << c;
}
}
}
return oss.str();
}
#if __cplusplus >= 201703L
SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT
{
const char *buffer = m_buffer + m_offset + 88;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string_view result(buffer, length);
return result;
}
#endif
#if __cplusplus >= 201703L
OrderCancelRequest516 &putOrigOrderUser(const std::string_view str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
}
std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 88 + start] = 0;
}
return *this;
}
#else
OrderCancelRequest516 &putOrigOrderUser(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
}
std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 88 + start] = 0;
}
return *this;
}
#endif
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, OrderCancelRequest516 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, OrderCancelRequest516 _writer)
{
OrderCancelRequest516 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
OrderCancelRequest516 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "OrderCancelRequest516", )";
builder << R"("sbeTemplateId": )";
@@ -1633,6 +1876,11 @@ friend std::basic_ostream<CharT, Traits>& operator << (
builder << R"("LiquidityFlag": )";
builder << '"' << writer.liquidityFlag() << '"';
builder << ", ";
builder << R"("OrigOrderUser": )";
builder << '"' <<
writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"';
builder << '}';
return builder;
@@ -2,80 +2,17 @@
#ifndef _ILINKBINARY_ORDEREVENTTYPE_H_
#define _ILINKBINARY_ORDEREVENTTYPE_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 OrderEventType
@@ -124,8 +60,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& os, OrderEventType::Value m)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &os, OrderEventType::Value m)
{
return os << OrderEventType::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
@@ -164,10 +165,10 @@ private:
}
public:
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(114);
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(130);
static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(562);
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>(114);
return static_cast<std::uint16_t>(130);
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
@@ -240,7 +242,7 @@ public:
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
{
return static_cast<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 = OrderMassActionReport562(buffer, offset, bufferLength, actingBlockLength, actingVersion);
}
OrderMassActionReport562 &sbeRewind()
{
return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
}
SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
{
return m_position;
@@ -668,7 +675,7 @@ public:
return *this;
}
#else
OrderMassActionReport562 &putSenderID(const std::string& str)
OrderMassActionReport562 &putSenderID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -1354,7 +1361,7 @@ public:
return *this;
}
#else
OrderMassActionReport562 &putSecurityGroup(const std::string& str)
OrderMassActionReport562 &putSecurityGroup(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 6)
@@ -1560,7 +1567,7 @@ public:
return *this;
}
#else
OrderMassActionReport562 &putLocation(const std::string& str)
OrderMassActionReport562 &putLocation(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 5)
@@ -2697,6 +2704,468 @@ public:
return *this;
}
SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "String";
case MetaAttribute::PRESENCE: return "optional";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT
{
return 9937;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= origOrderUserSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT
{
return 114;
}
static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT
{
return static_cast<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 + 114;
}
SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return nullptr;
}
return m_buffer + m_offset + 114;
}
SBE_NODISCARD char origOrderUser(const std::uint64_t index) const
{
if (index >= 8)
{
throw std::runtime_error("index out of range for origOrderUser [E104]");
}
if (m_actingVersion < 8)
{
return static_cast<char>(0);
}
char val;
std::memcpy(&val, m_buffer + m_offset + 114 + (index * 1), sizeof(char));
return (val);
}
OrderMassActionReport562 &origOrderUser(const std::uint64_t index, const char value)
{
if (index >= 8)
{
throw std::runtime_error("index out of range for origOrderUser [E105]");
}
char val = (value);
std::memcpy(m_buffer + m_offset + 114 + (index * 1), &val, sizeof(char));
return *this;
}
std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const
{
if (length > 8)
{
throw std::runtime_error("length too large for getOrigOrderUser [E106]");
}
if (m_actingVersion < 8)
{
return 0;
}
std::memcpy(dst, m_buffer + m_offset + 114, sizeof(char) * static_cast<std::size_t>(length));
return length;
}
OrderMassActionReport562 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT
{
std::memcpy(m_buffer + m_offset + 114, src, sizeof(char) * 8);
return *this;
}
SBE_NODISCARD std::string getOrigOrderUserAsString() const
{
const char *buffer = m_buffer + m_offset + 114;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string result(buffer, length);
return result;
}
std::string getOrigOrderUserAsJsonEscapedString()
{
if (m_actingVersion < 8)
{
return std::string("");
}
std::ostringstream oss;
std::string s = getOrigOrderUserAsString();
for (const auto c : s)
{
switch (c)
{
case '"': oss << "\\\""; break;
case '\\': oss << "\\\\"; break;
case '\b': oss << "\\b"; break;
case '\f': oss << "\\f"; break;
case '\n': oss << "\\n"; break;
case '\r': oss << "\\r"; break;
case '\t': oss << "\\t"; break;
default:
if ('\x00' <= c && c <= '\x1f')
{
oss << "\\u" << std::hex << std::setw(4)
<< std::setfill('0') << (int)(c);
}
else
{
oss << c;
}
}
}
return oss.str();
}
#if __cplusplus >= 201703L
SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT
{
const char *buffer = m_buffer + m_offset + 114;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string_view result(buffer, length);
return result;
}
#endif
#if __cplusplus >= 201703L
OrderMassActionReport562 &putOrigOrderUser(const std::string_view str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
}
std::memcpy(m_buffer + m_offset + 114, str.data(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 114 + start] = 0;
}
return *this;
}
#else
OrderMassActionReport562 &putOrigOrderUser(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putOrigOrderUser [E106]");
}
std::memcpy(m_buffer + m_offset + 114, str.c_str(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 114 + start] = 0;
}
return *this;
}
#endif
SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
switch (metaAttribute)
{
case MetaAttribute::SEMANTIC_TYPE: return "String";
case MetaAttribute::PRESENCE: return "optional";
default: return "";
}
}
static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT
{
return 2807;
}
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT
{
return 8;
}
SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT
{
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
return m_actingVersion >= cancelTextSinceVersion();
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT
{
return 122;
}
static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT
{
return static_cast<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 + 122;
}
SBE_NODISCARD char *cancelText() SBE_NOEXCEPT
{
if (m_actingVersion < 8)
{
return nullptr;
}
return m_buffer + m_offset + 122;
}
SBE_NODISCARD char cancelText(const std::uint64_t index) const
{
if (index >= 8)
{
throw std::runtime_error("index out of range for cancelText [E104]");
}
if (m_actingVersion < 8)
{
return static_cast<char>(0);
}
char val;
std::memcpy(&val, m_buffer + m_offset + 122 + (index * 1), sizeof(char));
return (val);
}
OrderMassActionReport562 &cancelText(const std::uint64_t index, const char value)
{
if (index >= 8)
{
throw std::runtime_error("index out of range for cancelText [E105]");
}
char val = (value);
std::memcpy(m_buffer + m_offset + 122 + (index * 1), &val, sizeof(char));
return *this;
}
std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const
{
if (length > 8)
{
throw std::runtime_error("length too large for getCancelText [E106]");
}
if (m_actingVersion < 8)
{
return 0;
}
std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast<std::size_t>(length));
return length;
}
OrderMassActionReport562 &putCancelText(const char *const src) SBE_NOEXCEPT
{
std::memcpy(m_buffer + m_offset + 122, src, sizeof(char) * 8);
return *this;
}
SBE_NODISCARD std::string getCancelTextAsString() const
{
const char *buffer = m_buffer + m_offset + 122;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string result(buffer, length);
return result;
}
std::string getCancelTextAsJsonEscapedString()
{
if (m_actingVersion < 8)
{
return std::string("");
}
std::ostringstream oss;
std::string s = getCancelTextAsString();
for (const auto c : s)
{
switch (c)
{
case '"': oss << "\\\""; break;
case '\\': oss << "\\\\"; break;
case '\b': oss << "\\b"; break;
case '\f': oss << "\\f"; break;
case '\n': oss << "\\n"; break;
case '\r': oss << "\\r"; break;
case '\t': oss << "\\t"; break;
default:
if ('\x00' <= c && c <= '\x1f')
{
oss << "\\u" << std::hex << std::setw(4)
<< std::setfill('0') << (int)(c);
}
else
{
oss << c;
}
}
}
return oss.str();
}
#if __cplusplus >= 201703L
SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT
{
const char *buffer = m_buffer + m_offset + 122;
std::size_t length = 0;
for (; length < 8 && *(buffer + length) != '\0'; ++length);
std::string_view result(buffer, length);
return result;
}
#endif
#if __cplusplus >= 201703L
OrderMassActionReport562 &putCancelText(const std::string_view str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putCancelText [E106]");
}
std::memcpy(m_buffer + m_offset + 122, str.data(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 122 + start] = 0;
}
return *this;
}
#else
OrderMassActionReport562 &putCancelText(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 8)
{
throw std::runtime_error("string too large for putCancelText [E106]");
}
std::memcpy(m_buffer + m_offset + 122, str.c_str(), srcLength);
for (std::size_t start = srcLength; start < 8; ++start)
{
m_buffer[m_offset + 122 + start] = 0;
}
return *this;
}
#endif
class NoAffectedOrders
{
private:
@@ -2823,7 +3292,7 @@ public:
return *this;
}
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT
inline std::uint64_t resetCountToIndex()
{
m_count = m_index;
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
@@ -2831,8 +3300,7 @@ public:
return m_count;
}
#if __cplusplus < 201103L
template<class Func> inline void forEach(Func& func)
template<class Func> inline void forEach(Func &&func)
{
while (hasNext())
{
@@ -2841,17 +3309,6 @@ public:
}
}
#else
template<class Func> inline void forEach(Func&& func)
{
while (hasNext())
{
next();
func(*this);
}
}
#endif
SBE_NODISCARD static const char *OrigCIOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
{
@@ -3041,7 +3498,7 @@ public:
return *this;
}
#else
NoAffectedOrders &putOrigCIOrdID(const std::string& str)
NoAffectedOrders &putOrigCIOrdID(const std::string &str)
{
const std::size_t srcLength = str.length();
if (srcLength > 20)
@@ -3202,8 +3659,8 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, NoAffectedOrders writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, NoAffectedOrders writer)
{
builder << '{';
builder << R"("OrigCIOrdID": )";
@@ -3286,11 +3743,16 @@ public:
}
template<typename CharT, typename Traits>
friend std::basic_ostream<CharT, Traits>& operator << (
std::basic_ostream<CharT, Traits>& builder, OrderMassActionReport562 _writer)
friend std::basic_ostream<CharT, Traits> & operator << (
std::basic_ostream<CharT, Traits> &builder, OrderMassActionReport562 _writer)
{
OrderMassActionReport562 writer(_writer.m_buffer, _writer.m_offset,
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
OrderMassActionReport562 writer(
_writer.m_buffer,
_writer.m_offset,
_writer.m_bufferLength,
_writer.m_actingBlockLength,
_writer.m_actingVersion);
builder << '{';
builder << R"("Name": "OrderMassActionReport562", )";
builder << R"("sbeTemplateId": )";
@@ -3407,19 +3869,30 @@ friend std::basic_ostream<CharT, Traits>& operator << (
builder << R"("DelayToTime": )";
builder << +writer.delayToTime();
builder << ", ";
builder << R"("OrigOrderUser": )";
builder << '"' <<
writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"';
builder << ", ";
builder << R"("CancelText": )";
builder << '"' <<
writer.getCancelTextAsJsonEscapedString().c_str() << '"';
builder << ", ";
{
bool atLeastOne = false;
builder << R"("NoAffectedOrders": [)";
writer.noAffectedOrders().forEach([&](NoAffectedOrders& noAffectedOrders)
{
if (atLeastOne)
writer.noAffectedOrders().forEach(
[&](NoAffectedOrders &noAffectedOrders)
{
builder << ", ";
}
atLeastOne = true;
builder << noAffectedOrders;
});
if (atLeastOne)
{
builder << ", ";
}
atLeastOne = true;
builder << noAffectedOrders;
});
builder << ']';
}
@@ -3430,10 +3903,11 @@ friend std::basic_ostream<CharT, Traits>& operator << (
void skip()
{
noAffectedOrders().forEach([](NoAffectedOrders e)
auto &noAffectedOrdersGroup { noAffectedOrders() };
while (noAffectedOrdersGroup.hasNext())
{
e.skip();
});
noAffectedOrdersGroup.next().skip();
}
}
SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
Loaded 100 of 189 files, more files were not shown because too many files have changed in this diff. Show more