Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
489ac45722 | ||
|
|
d910c65e20 | ||
|
|
cb0e4de6c5 | ||
|
|
71539424cc | ||
|
|
602929b945 | ||
|
|
07591f8e28 | ||
|
|
0cb11b7f8d | ||
|
|
1921f02d30 | ||
|
|
2199efc95d | ||
|
|
54ff55f22f | ||
|
|
e7806d2fec | ||
|
|
c30bab899f | ||
|
|
46544f36f1 | ||
|
|
c7df3ac43c | ||
|
|
9d1b03d1e2 | ||
|
|
9a677cf980 | ||
|
|
25445d58d0 | ||
|
|
0b313a8aa8 | ||
|
|
54f954fd4b | ||
|
|
980f38ba03 | ||
|
|
9eada2724b | ||
|
|
b5f53ee918 | ||
|
|
efc175f654 | ||
|
|
6074afd999 | ||
|
|
219dff4055 | ||
|
|
9a3b07b622 |
No files matched your search
@@ -37,4 +37,3 @@ trace_data/
|
||||
*.rej
|
||||
/build
|
||||
.clangd/
|
||||
*CMakeDeps.cmake
|
||||
@@ -1 +1 @@
|
||||
set(sources /home/ppinto/Dropbox/bts/spark/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
|
||||
set(sources /home/pfisher/bts/DJ_ICE/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
|
||||
+1
-1
Submodule docker/linux updated: 6f0dd9324b...7258a028d7.
@@ -1,6 +1,7 @@
|
||||
using bts.api;
|
||||
using bts.co2;
|
||||
using bts.utils;
|
||||
using bts.utils.csv;
|
||||
using mbts;
|
||||
using mbts.spark;
|
||||
using mbts.ui.controls;
|
||||
@@ -49,6 +50,18 @@ namespace bts.shell.time_and_sales {
|
||||
public void raise_invalidated() =>
|
||||
invalidated?.Invoke();
|
||||
|
||||
public static System.Collections.Specialized.OrderedDictionary csv_ordered_properties =>
|
||||
CsvHelper.create_ordering_maintainer(
|
||||
typeof(TimeAndSalesRowVM),
|
||||
new string[] {
|
||||
nameof(security),
|
||||
nameof(time),
|
||||
nameof(price),
|
||||
nameof(size),
|
||||
nameof(aggressor_side),
|
||||
nameof(security_key),
|
||||
});
|
||||
|
||||
public bool Equals(TimeAndSalesRowVM other) =>
|
||||
other != null &&
|
||||
row_key == other.row_key;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using bts.shell.fills;
|
||||
using bts.spark;
|
||||
using bts.view;
|
||||
using bts.utils.csv;
|
||||
using mbts;
|
||||
using mbts.co2;
|
||||
using mbts.persist;
|
||||
@@ -124,6 +125,8 @@ namespace bts.shell.time_and_sales {
|
||||
show_in_context_menu = _can_pause_updates
|
||||
};
|
||||
_commands = new SparkCommand[] {
|
||||
// csv export
|
||||
new SparkCommandCommand("Export to csv", Icons.Export, FileDialogCommand.export_csv(() => _vm.rows.ToCsv(TimeAndSalesRowVM.csv_ordered_properties), "TaS")),
|
||||
// ladder
|
||||
SparkCommands.ShowLadderAutoLookup(SparkCommands.KeyGestures.ShowLadder)
|
||||
.complete(current_sec_key_src, sec_keys => sec_keys.Count > 0),
|
||||
|
||||
@@ -5,6 +5,7 @@ using bts.collections;
|
||||
using bts.shell.fills;
|
||||
using bts.spark;
|
||||
using bts.utils;
|
||||
using bts.utils.csv;
|
||||
using mbts.collections;
|
||||
using mbts.persist;
|
||||
using mbts.spark.filters;
|
||||
@@ -333,6 +334,27 @@ namespace mbts.spark {
|
||||
public override bool Equals(object obj) => Equals(obj as Row);
|
||||
public override int GetHashCode() => _fill.FillKey.GetHashCode() ^ _order.Key.GetHashCode();
|
||||
|
||||
public static System.Collections.Specialized.OrderedDictionary csv_ordered_properties =>
|
||||
CsvHelper.create_ordering_maintainer(typeof(Row),
|
||||
new string[] {
|
||||
nameof(security),
|
||||
nameof(order_type),
|
||||
nameof(root_algo_display_name),
|
||||
nameof(side),
|
||||
nameof(fill_time),
|
||||
nameof(user),
|
||||
nameof(account),
|
||||
nameof(exchange),
|
||||
nameof(time_in_force),
|
||||
nameof(size),
|
||||
nameof(price),
|
||||
nameof(fill_kind),
|
||||
nameof(fill_status),
|
||||
nameof(fill_key),
|
||||
nameof(order_key),
|
||||
nameof(security_key)
|
||||
});
|
||||
|
||||
public event Action invalidated;
|
||||
void IRowVM.raise_invalidated() => invalidated?.Invoke();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using bts.shell;
|
||||
using bts.shell.fills;
|
||||
using bts.spark;
|
||||
using bts.view;
|
||||
using bts.utils.csv;
|
||||
using mbts.persist;
|
||||
using mbts.ui;
|
||||
using mbts.ui.settings;
|
||||
@@ -61,6 +62,7 @@ namespace mbts.spark {
|
||||
_view = new FillsView { DataContext = _vm };
|
||||
|
||||
_commands = new List<SparkCommand> {
|
||||
new SparkCommandCommand("Export to csv", Icons.Export, FileDialogCommand.export_csv(() => _vm.rows.ToCsv(FillsVM.Row.csv_ordered_properties), "Fills")),
|
||||
// wrap the grid settings view factory in a dialogCommand here since the vm is destroyed/recreated when the security criteria changes
|
||||
SparkCommands.window_settings_command(new DialogCommand(() => {
|
||||
var vm = new ShellSettingsDialogVM<GridSettings, SimpleGridSettingsVM>(
|
||||
|
||||
@@ -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,89 @@
|
||||
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) {
|
||||
selected_security_key = settings.security_key;
|
||||
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">
|
||||
|
||||
@@ -4,6 +4,7 @@ using bts.api.orderman;
|
||||
using bts.collections;
|
||||
using bts.spark;
|
||||
using bts.utils;
|
||||
using bts.utils.csv;
|
||||
using mbts.ui;
|
||||
using mbts.ui.controls;
|
||||
using System;
|
||||
@@ -11,6 +12,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Linq;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using Columns = mbts.spark.OrderBookGridView.ColumnKeys;
|
||||
@@ -60,6 +62,35 @@ namespace mbts.spark {
|
||||
public event Action<(OrderSecurityRootPair oldval, OrderSecurityRootPair newval)> updated;
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public static System.Collections.Specialized.OrderedDictionary csv_ordered_properties =>
|
||||
CsvHelper.create_ordering_maintainer(
|
||||
typeof(OrderBookRowVM),
|
||||
new string[] {
|
||||
nameof(security_text),
|
||||
nameof(symbol),
|
||||
nameof(time_created),
|
||||
nameof(last_change),
|
||||
nameof(user),
|
||||
nameof(account),
|
||||
nameof(exchange),
|
||||
nameof(time_in_force),
|
||||
nameof(order_type),
|
||||
nameof(root_algo_display_name),
|
||||
nameof(order_sub_type),
|
||||
nameof(side),
|
||||
nameof(quantity),
|
||||
nameof(filled_quantity),
|
||||
nameof(price),
|
||||
nameof(avg_price),
|
||||
nameof(last_price),
|
||||
nameof(piq),
|
||||
nameof(status),
|
||||
// last message (could contains commas, so skipping)
|
||||
nameof(security_key),
|
||||
nameof(order_key),
|
||||
nameof(parent_order_key),
|
||||
});
|
||||
|
||||
// Core
|
||||
public OrderSecurityRootPair order_tuple { get; private set; }
|
||||
public OrderRecordImmutable order => order_tuple.order.order;
|
||||
|
||||
@@ -6,6 +6,7 @@ using bts.shell.fills;
|
||||
using bts.shell.orderbook;
|
||||
using bts.spark;
|
||||
using bts.view;
|
||||
using bts.utils.csv;
|
||||
using mbts.persist;
|
||||
using mbts.spark.utilities;
|
||||
using mbts.ui;
|
||||
@@ -231,6 +232,7 @@ namespace mbts.spark {
|
||||
toggle_collapse_all_command,
|
||||
toggle_expand_all_command,
|
||||
show_grid_settings_command,
|
||||
new SparkCommandCommand("Export to csv", Icons.Export, FileDialogCommand.export_csv(() => _vm.rows.ToCsv(OrderBookRowVM.csv_ordered_properties), "OrderBook")),
|
||||
// hidden cmds (i.e., keyboard shortcuts at window level)
|
||||
hidden_cmd(new SparkCommandCommand(OrderBookView.CommandDescriptions.ModifyOrders, null, _vm.modify_selected_orders_cmd, OrderBookView.KeyboardShortcuts.ModifyOrders)),
|
||||
hidden_cmd(new SparkCommandCommand(OrderBookView.CommandDescriptions.RevertOrders, null, _vm.revert_selected_orders_cmd, OrderBookView.KeyboardShortcuts.RevertOrders)),
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -64,6 +64,25 @@ namespace mbts.ui {
|
||||
}
|
||||
}, can_execute == null ? null : new Func<object, bool>(_ => can_execute()));
|
||||
|
||||
public static IDialogCommand export_csv(
|
||||
Func<string> get_file_content,
|
||||
string source_window_name) =>
|
||||
new AnonymousFileDialogCommand<object>(_ =>
|
||||
_create_save_file_dialog(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
|
||||
$"BTS_Spark_{source_window_name}_{DateTime.Now.ToString("yyyyMMdd_HHmm")}.csv",
|
||||
new[] { ("CSV (comma delimited)", new string[] { "csv" }) }
|
||||
),
|
||||
(_, file) => {
|
||||
try {
|
||||
File.WriteAllText(file, get_file_content.Invoke());
|
||||
} catch (Exception ex) {
|
||||
BTSMessageBox.Show($"Error exporting data to csv: {ex}.", "CSV Export Error", BTSMessageBoxButtons.OK, System.Windows.MessageBoxImage.Error, true, false, true);
|
||||
}
|
||||
},
|
||||
// we are always able to perform an export, even when no rows (it will just be a header)
|
||||
(_) => true);
|
||||
|
||||
static TDialog _create_file_dialog<TDialog>(string initial_dir = null, IReadOnlyList<(string name, string[] extensions)> filter_items = null) where TDialog : FileDialog, new() {
|
||||
var rv = new TDialog();
|
||||
if (!string.IsNullOrEmpty(initial_dir))
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace bts.utils.csv {
|
||||
public static class CsvHelper {
|
||||
|
||||
public static string ToCsv<T>(this IEnumerable<T> items, OrderedDictionary properties = null) where T : class {
|
||||
var output = "";
|
||||
var delimiter = ",";
|
||||
if (properties == null) {
|
||||
properties = new OrderedDictionary();
|
||||
foreach (var pi in typeof(T).GetProperties()) {
|
||||
properties.Add(pi.Name, pi);
|
||||
}
|
||||
}
|
||||
|
||||
using (var sw = new StringWriter()) {
|
||||
var dict_values = properties.Values.OfType<PropertyInfo>();
|
||||
var header = dict_values.Select(n => n.Name).Aggregate((first, second) => first + delimiter + second);
|
||||
sw.WriteLine(header);
|
||||
foreach (var i in items) {
|
||||
var row = dict_values.Select(x => x.GetValue(i, null))
|
||||
.Select(x => x == null ? "null" : x.ToString())
|
||||
.Aggregate((first, second) => first + delimiter + second);
|
||||
sw.WriteLine(row);
|
||||
}
|
||||
output = sw.ToString();
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
public static OrderedDictionary create_ordering_maintainer(Type t, string[] property_names_in_order) {
|
||||
OrderedDictionary od = new OrderedDictionary();
|
||||
var props = t.GetProperties();
|
||||
foreach (var n in property_names_in_order) {
|
||||
var query = props.Where(pi => pi.Name == n);
|
||||
if (query.Any()) {
|
||||
var property_info = query.First();
|
||||
if (!od.Contains(property_info)) {
|
||||
od.Add(n, property_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
return od;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1 @@
|
||||
<<<<<<< HEAD
|
||||
set(sources files/cert_secure_logon.txt;files/futures.coconut.xz;files/onixs_ice/ConnectivityConfiguration.APITest.xml;files/onixs_ice/ConnectivityConfiguration.APITest.xml.orig;files/onixs_ice/ConnectivityConfiguration.PerfTest.xml;files/onixs_ice/ConnectivityConfiguration.Production.xml;files/perf_trace/compiled.css;files/perf_trace/index.html;files/perf_trace/jquery-3.3.1.min.js;files/perf_trace/main.js;files/perf_trace/perf_log.sql;files/perf_trace/perf_trace_analysis.sql;files/perf_trace/plotly-latest.min.js)
|
||||
=======
|
||||
set(sources files/audit_ilink3.py;files/audit_upload.sh;files/audit_uploader.py;files/cert_secure_logon.txt;files/example.conf;files/futures.coconut.xz;files/onixs_ice/ConnectivityConfiguration.APITest.xml;files/onixs_ice/ConnectivityConfiguration.APITest.xml.orig;files/onixs_ice/ConnectivityConfiguration.PerfTest.xml;files/onixs_ice/ConnectivityConfiguration.Production.xml;files/perf_trace/compiled.css;files/perf_trace/index.html;files/perf_trace/jquery-3.3.1.min.js;files/perf_trace/main.js;files/perf_trace/perf_log.sql;files/perf_trace/perf_trace_analysis.sql;files/perf_trace/plotly-latest.min.js)
|
||||
>>>>>>> master
|
||||
set(sources files/audit_ilink3.py;files/audit_upload.sh;files/audit_uploader.py;files/cert_secure_logon.txt;files/example.conf;files/futures.coconut.xz;files/onixs_ice/ConnectivityConfiguration.APITest.xml;files/onixs_ice/ConnectivityConfiguration.PerfTest.xml;files/onixs_ice/ConnectivityConfiguration.Production.xml;files/perf_trace/compiled.css;files/perf_trace/index.html;files/perf_trace/jquery-3.3.1.min.js;files/perf_trace/main.js;files/perf_trace/perf_log.sql;files/perf_trace/perf_trace_analysis.sql;files/perf_trace/plotly-latest.min.js)
|
||||
Executable
+206
@@ -0,0 +1,206 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import re
|
||||
import fileinput
|
||||
import sys
|
||||
import collections
|
||||
import csv
|
||||
import time, datetime
|
||||
import copy
|
||||
import itertools
|
||||
import argparse
|
||||
|
||||
# region fix record processing
|
||||
|
||||
valid_message_types = {
|
||||
'D': 'NEW ORDER',
|
||||
'G': 'MODIFY',
|
||||
'F': 'CANCEL',
|
||||
'8': 'EXECUTION',
|
||||
'i': 'MASS QUOTE',
|
||||
'R': 'QUOTE REQUEST',
|
||||
'b': 'QUOTE ACK',
|
||||
'Z': 'MASS QUOTE CANCEL',
|
||||
# 'c': 'SECURITY DEFINITION REQUEST',
|
||||
'3': 'SESSION LEVEL REJECT',
|
||||
'j': 'BUSINESS LEVEL REJECT',
|
||||
'9': 'CANCEL REJECT',
|
||||
'CA': 'ORDER MASS ACTION REQUEST',
|
||||
'BZ': 'ORDER MASS ACTION REPORT'
|
||||
}
|
||||
|
||||
def print_headers():
|
||||
# From https://www.theice.com/publicdocs/futures_us/exchange_notices/ICE_Advisory_0113_009.pdf
|
||||
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:
|
||||
the_file.write(line_to_write)
|
||||
the_file.write("\n")
|
||||
|
||||
line_to_write = "Activity Date,Client Order ID,Original Order ID,Order Entry/Modification Time,Commodity,Contract Month,Future/Option Indicator,\
|
||||
Strike Price,,Put or Call,Buy/Sell Indicator,Quantity,Reserve Quantity,Order Type,Price,Stop Price,Account #,CM#,\
|
||||
Order Status,Clearing Account Code,CTI,ETS Login ID,Routing Member ID,Authorized Trader ID,Authorized Trdr ID,\
|
||||
Routing Trdr,Routing Grp,Time In Force"
|
||||
|
||||
with open (args.output_file, 'a') as the_file:
|
||||
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:
|
||||
return parsed_fix_record[field_name]
|
||||
else:
|
||||
return None
|
||||
return result
|
||||
|
||||
def parse_fix_line(line):
|
||||
ts = line[:21]
|
||||
fix_line = line[24:].split('\1')
|
||||
result = {}
|
||||
result['timestamp'] = ts
|
||||
for fix_field in fix_line:
|
||||
rx = r"(?P<tag>\d+)?=(?P<value>.*)"
|
||||
match = re.match(rx,fix_field)
|
||||
if match:
|
||||
result[match.group('tag')] = match.group('value')
|
||||
return result
|
||||
|
||||
def tagged_field(line,number):
|
||||
if number in line:
|
||||
return line[number]
|
||||
else:
|
||||
return ""
|
||||
|
||||
def formatted_tagged_field(line,number):
|
||||
if number in line:
|
||||
return line[number].lstrip("0")
|
||||
else:
|
||||
return ""
|
||||
|
||||
def lr_tagged_field(line,number):
|
||||
if number in line:
|
||||
return line[number].rsplit('|',1)
|
||||
else:
|
||||
return "",""
|
||||
|
||||
def lr_contract_month(line,number):
|
||||
try:
|
||||
ice_line="ICE_SECURITY_ID_TO_SYMBOL_MAPPING: " + line[number]
|
||||
with open('/sparkdata/data/md_dump.txt') as f:
|
||||
datafile = f.readlines()
|
||||
for data in datafile:
|
||||
if data.find(str(ice_line)) != -1:
|
||||
placeholder=data.find('> ')+1
|
||||
get_ending=data[placeholder:]
|
||||
get_ending=get_ending.strip()
|
||||
return get_ending.split(" ")
|
||||
except KeyError:
|
||||
print("Can not find key 55")
|
||||
return "",""
|
||||
|
||||
|
||||
def valid_file(f):
|
||||
if not os.path.exists(f):
|
||||
# Argparse uses the ArgumentTypeError to give a rejection message like:
|
||||
# error: argument input: x does not exist
|
||||
raise argparse.ArgumentTypeError("{0} does not exist".format(f))
|
||||
return f
|
||||
|
||||
def valid_date(s):
|
||||
try:
|
||||
return datetime.datetime.strptime(s, "%Y%m%d")
|
||||
except ValueError:
|
||||
raise argparse.ArgumentTypeError("Not a valid date: '{0}'.".format(s))
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("quickfix_log", help="the quickfix log[.gz] you wish to process", type=valid_file)
|
||||
parser.add_argument("output_file", help="the destination csv file you wish to write")
|
||||
parser.add_argument("-d", "--date", help="the date you wish to parse from the log, specified as YYYYmmdd",
|
||||
default=datetime.datetime.today().strftime("%Y%m%d"), type=valid_date)
|
||||
#quickfix_log="/home/pfisher/temp/audit/fix"
|
||||
#output_file="/home/pfisher/temp/audit/fix.csv"
|
||||
args = parser.parse_args()
|
||||
|
||||
# Note that the timedeltas specificed in trade_day_start and trade_day_end
|
||||
# are based on Chicago times; as such, this script should run on a machine
|
||||
# set to a Chicago timezone. A future impromovement would be to determine
|
||||
# the current machine's timezone and determine the appropriate offset
|
||||
# versus Chicago time, but for now we assume this will run on a Chicago
|
||||
# tz machine.
|
||||
input_as_datetime = args.date
|
||||
trade_day_start = input_as_datetime - datetime.timedelta(days=1) + datetime.timedelta(hours=17, minutes=30)
|
||||
trade_day_utc_start = time.gmtime((time.mktime(trade_day_start.timetuple())))
|
||||
trade_day_end = input_as_datetime + datetime.timedelta(hours=17)
|
||||
trade_day_utc_end = time.gmtime((time.mktime(trade_day_end.timetuple())))
|
||||
|
||||
#file_opener = open
|
||||
file_opener = None
|
||||
if args.quickfix_log.endswith(".gz"):
|
||||
import gzip
|
||||
file_opener = gzip.open
|
||||
else:
|
||||
file_opener = open
|
||||
|
||||
audit_entries = []
|
||||
line_number = 0
|
||||
print_headers()
|
||||
with file_opener(args.quickfix_log) as input_file:
|
||||
#with file_opener(quickfix_log) as input_file:
|
||||
for line in input_file:
|
||||
try:
|
||||
line_timestamp = time.strptime(line[:21], "%Y%m%d-%H:%M:%S.%f")
|
||||
except:
|
||||
continue
|
||||
if trade_day_utc_start <= line_timestamp <= trade_day_utc_end:
|
||||
parsed_fix_record = parse_fix_line(line)
|
||||
if parsed_fix_record['35'] in valid_message_types:
|
||||
line_number = line_number + 1
|
||||
# Static fields
|
||||
tt = datetime.datetime.strptime(line[:21], "%Y%m%d-%H:%M:%S.%f")
|
||||
transacttime = tt.strftime('%Y%m%d-%H:%M:%S.%f')
|
||||
activedate = time.strftime('%Y%m%d',time.strptime(line[:8], "%Y%m%d"))
|
||||
securitytype = "FUT"
|
||||
stkprc = ""
|
||||
putcall = ""
|
||||
#symbol = "HNG"
|
||||
#contractmonth = "U20"
|
||||
# No formatting fields
|
||||
ciorderid = tagged_field(parsed_fix_record, '11')
|
||||
orderid = tagged_field(parsed_fix_record,'37')
|
||||
side = tagged_field(parsed_fix_record,'54')
|
||||
orderquanity = tagged_field(parsed_fix_record,'38')
|
||||
maxshow = tagged_field(parsed_fix_record,'201')
|
||||
ordertype = tagged_field(parsed_fix_record,'40')
|
||||
stoppx = tagged_field(parsed_fix_record,'99')
|
||||
clearingaccount = tagged_field(parsed_fix_record,'440')
|
||||
clearingfirm = tagged_field(parsed_fix_record,'439')
|
||||
orderstate = tagged_field(parsed_fix_record,'9175')
|
||||
accountcode = tagged_field(parsed_fix_record,'9195')
|
||||
cticode = tagged_field(parsed_fix_record,'9208')
|
||||
originatoruserid = tagged_field(parsed_fix_record,'9139')
|
||||
timeinforce = tagged_field(parsed_fix_record,'59')
|
||||
# Needs Formatting
|
||||
price = formatted_tagged_field(parsed_fix_record,'44')
|
||||
# Left Right
|
||||
OnBehalfOfCompID_Left,OnBehalfOfCompID_Right = lr_tagged_field(parsed_fix_record,'115')
|
||||
OnBehalfOfSubID_Left,OnBehalfOfSubID_Right = lr_tagged_field(parsed_fix_record,'116')
|
||||
OnBehalfOfLocationID_Left,OnBehalfOfLocationID_Right = lr_tagged_field(parsed_fix_record,'144')
|
||||
if parsed_fix_record['35'] == "9":
|
||||
symbol = ""
|
||||
contractmonth = ""
|
||||
else:
|
||||
symbol,contractmonth = lr_contract_month(parsed_fix_record,'55')
|
||||
line_to_write = activedate + "," + ciorderid + "," + orderid + "," + transacttime + "," + symbol + "," + contractmonth + "," + securitytype + "," + \
|
||||
stkprc + "," + putcall + "," + side + "," + orderquanity + "," + maxshow + "," + ordertype + "," + price + "," + stoppx + "," + \
|
||||
clearingaccount + "," + clearingfirm + "," + orderstate + "," + accountcode + "," + cticode + "," + originatoruserid + "," + OnBehalfOfCompID_Left + "," + \
|
||||
OnBehalfOfCompID_Right + "," + OnBehalfOfSubID_Left + "," + OnBehalfOfSubID_Right + "," + OnBehalfOfLocationID_Left + "," + timeinforce
|
||||
with open (args.output_file, 'a') as the_file:
|
||||
the_file.write(line_to_write)
|
||||
the_file.write("\n")
|
||||
# except Exception:
|
||||
# pass
|
||||
@@ -40,23 +40,34 @@ SESSION_ID=${conf_vars[session_id]}
|
||||
FCM=${conf_vars[fcm]}
|
||||
CLIENT=${conf_vars[client]}
|
||||
|
||||
# Create MD dump
|
||||
cd /sparkbin
|
||||
./sparkd md dumpsecurity all > /sparkdata/data/md_dump.txt
|
||||
|
||||
cd /sparkbin/data_files
|
||||
|
||||
for SESSION in $(ls /sparkdata/data/ilink3/); do
|
||||
for SESSION in $(ls /sparkdata/data/{ilink3,jetfix}/); do
|
||||
if [[ $SESSION == *$SESSION_ID* ]]; then
|
||||
echo "Session is $SESSION"
|
||||
SESSION_DAY=$(date +%Y-%m-%d)
|
||||
SESSION_DAY=$(date -d $DATE +%Y-%m-%d)
|
||||
if [[ $SESSION == "cme_"* ]]; then
|
||||
SESSION_DAY=$(date -d "$DATE -$(date -d $DATE +%u) days" +"%Y-%m-%d")
|
||||
AUDIT_SCRIPT="audit_ilink3.py"
|
||||
ILINK_TYPE="ilink3"
|
||||
LOG_NAME="log"
|
||||
elif [[ $SESSION == "ice_"* ]]; then
|
||||
SESSION_DAY=$(date -d "$DATE 2 days ago" +%Y-%m-%d)
|
||||
AUDIT_SCRIPT="audit_ice.py"
|
||||
ILINK_TYPE="jetfix"
|
||||
LOG_NAME="fix"
|
||||
fi
|
||||
echo $SESSION_DAY
|
||||
if [[ ! -d /sparkdata/data/ilink3/$SESSION/audit_logs ]]; then
|
||||
mkdir -p /sparkdata/data/ilink3/$SESSION/audit_logs
|
||||
if [[ ! -d /sparkdata/data/$ILINK_TYPE/$SESSION/audit_logs ]]; then
|
||||
mkdir -p /sparkdata/data/$ILINK_TYPE/$SESSION/audit_logs
|
||||
fi
|
||||
if [[ -d /sparkdata/data/ilink3/$SESSION/$SESSION_DAY ]]; then
|
||||
if [[ -d /sparkdata/data/$ILINK_TYPE/$SESSION/$SESSION_DAY ]]; then
|
||||
echo "Starting the creation of the audit log"
|
||||
python $AUDIT_SCRIPT -d $DATE /sparkdata/data/ilink3/$SESSION/$SESSION_DAY/log /sparkdata/data/ilink3/$SESSION/audit_logs/"$FCM"_audit_"$SESSION"_"$DATE".csv
|
||||
python3 $AUDIT_SCRIPT -d $DATE /sparkdata/data/$ILINK_TYPE/$SESSION/$SESSION_DAY/$LOG_NAME /sparkdata/data/$ILINK_TYPE/$SESSION/audit_logs/"$FCM"_audit_"$SESSION"_"$DATE".csv
|
||||
fi
|
||||
if [[ ! -d /sparkdata/data/md_audit ]]; then
|
||||
mkdir /sparkdata/data/md_audit
|
||||
@@ -68,6 +79,6 @@ for SESSION in $(ls /sparkdata/data/ilink3/); do
|
||||
cd /sparkbin/data_files
|
||||
fi
|
||||
echo "Uploading to the (s)FTP Server"
|
||||
python audit_uploader.py --config_file="$CONFIG_FILE" --datestamp $DATE --session="$SESSION" --client="$CLIENT" --fcm="$FCM"
|
||||
python3 audit_uploader.py --config_file="$CONFIG_FILE" --datestamp $DATE --session="$SESSION" --client="$CLIENT" --fcm="$FCM"
|
||||
fi
|
||||
done
|
||||
@@ -6,31 +6,31 @@ import paramiko, ftplib
|
||||
#########################################################
|
||||
|
||||
def usage():
|
||||
print "-------------------------------------------------------"
|
||||
print "-Usage: -"
|
||||
print "-------------------------------------------------------"
|
||||
print "- --config_file= : Path to upload config file -"
|
||||
print "- -if no path is specified look -"
|
||||
print "- in the working directory. -"
|
||||
print "- -"
|
||||
print "- --help : Print this message -"
|
||||
print "- -"
|
||||
print "- --datestamp= : Optional, defaults to today -"
|
||||
print "- -replaces *datestamp in the -"
|
||||
print "- the upload config file -"
|
||||
print "- -"
|
||||
print "- --fcm : Optional, spark input -"
|
||||
print "- -"
|
||||
print "- --session : Optional, spark jf session -"
|
||||
print "-------------------------------------------------------"
|
||||
print ("-------------------------------------------------------")
|
||||
print ("-Usage: -")
|
||||
print ("-------------------------------------------------------")
|
||||
print ("- --config_file= : Path to upload config file -")
|
||||
print ("- -if no path is specified look -")
|
||||
print ("- in the working directory. -")
|
||||
print ("- -")
|
||||
print ("- --help : Print this message -")
|
||||
print ("- -")
|
||||
print ("- --datestamp= : Optional, defaults to today -")
|
||||
print ("- -replaces *datestamp in the -")
|
||||
print ("- the upload config file -")
|
||||
print ("- -")
|
||||
print ("- --fcm : Optional, spark input -")
|
||||
print ("- -")
|
||||
print ("- --session : Optional, spark jf session -")
|
||||
print ("-------------------------------------------------------")
|
||||
|
||||
fcm = ''
|
||||
session = ''
|
||||
|
||||
try:
|
||||
options, arguments = getopt.getopt(sys.argv[1:],"h",['config_file=', 'datestamp=', 'help', 'fcm=', 'client=', 'session='])
|
||||
except getopt.GetoptError, err:
|
||||
print str(err)
|
||||
except getopt.GetoptError as err:
|
||||
print(err)
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
@@ -54,11 +54,11 @@ for argument in arguments:
|
||||
usage()
|
||||
sys.exit()
|
||||
else:
|
||||
print "Unrecognized commandline argument. Type help for usage."
|
||||
print ("Unrecognized commandline argument. Type help for usage.")
|
||||
sys.exit()
|
||||
|
||||
if len(options) <= 0:
|
||||
print "Requires a config file to run."
|
||||
print("Requires a config file to run.")
|
||||
usage()
|
||||
sys.exit()
|
||||
|
||||
@@ -98,14 +98,14 @@ def read_config_file(config_file, datestamp=datetime.datetime.today().strftime('
|
||||
# FTP File Transfer Function #
|
||||
#########################################################
|
||||
def putfile_ftp(file, put_path, site, user, password, port=21, verbose=True):
|
||||
if verbose: print 'Uploading', file
|
||||
if verbose: print("Uploading", file)
|
||||
local = open(file, 'rb')
|
||||
remote = ftplib.FTP(site)
|
||||
remote.login(user, password)
|
||||
remote.storbinary(put_path, local, 1024)
|
||||
remote.quit()
|
||||
local.close()
|
||||
if verbose: print 'Upload done.'
|
||||
if verbose: print("Upload done.")
|
||||
|
||||
#########################################################
|
||||
# SFTP File Transfer Function #
|
||||
@@ -136,15 +136,29 @@ else:
|
||||
|
||||
|
||||
|
||||
print upload_config
|
||||
print(upload_config)
|
||||
|
||||
if upload_config["PROTOCOL_PUT"] in ['FTP','ftp']:
|
||||
print "Protocol = FTP"
|
||||
putfile_ftp(upload_config["GET_ILINK3_FILE_PATH"] + upload_config["GET_ILINK3_FILE_NAME"], upload_config["PUT_ILINK3_FILE_PATH"] + upload_config["PUT_ILINK3_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], upload_config["PORT_PUT"] )
|
||||
print("Protocol = FTP")
|
||||
try:
|
||||
putfile_ftp(upload_config["GET_ILINK3_FILE_PATH"] + upload_config["GET_ILINK3_FILE_NAME"], upload_config["PUT_ILINK3_FILE_PATH"] + upload_config["PUT_ILINK3_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], upload_config["PORT_PUT"] )
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
putfile_ftp(upload_config["GET_JETFIX_FILE_PATH"] + upload_config["GET_JETFIX_FILE_NAME"], upload_config["PUT_JETFIX_FILE_PATH"] + upload_config["PUT_JETFIX_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], upload_config["PORT_PUT"] )
|
||||
except KeyError:
|
||||
pass
|
||||
putfile_ftp(upload_config["GET_MD_FILE_PATH"] + upload_config["GET_MD_FILE_NAME"], upload_config["PUT_MD_FILE_PATH"] + upload_config["PUT_MD_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], upload_config["PORT_PUT"] )
|
||||
elif upload_config["PROTOCOL_PUT"] in ['SFTP','sftp']:
|
||||
print "Protocol = SFTP"
|
||||
putfile_sftp(upload_config["GET_ILINK3_FILE_PATH"] + upload_config["GET_ILINK3_FILE_NAME"], upload_config["PUT_ILINK3_FILE_PATH"] + upload_config["PUT_ILINK3_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], int(upload_config["PORT_PUT"]) )
|
||||
print("Protocol = SFTP")
|
||||
try:
|
||||
putfile_sftp(upload_config["GET_ILINK3_FILE_PATH"] + upload_config["GET_ILINK3_FILE_NAME"], upload_config["PUT_ILINK3_FILE_PATH"] + upload_config["PUT_ILINK3_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], int(upload_config["PORT_PUT"]) )
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
putfile_sftp(upload_config["GET_JETFIX_FILE_PATH"] + upload_config["GET_JETFIX_FILE_NAME"], upload_config["PUT_JETFIX_FILE_PATH"] + upload_config["PUT_JETFIX_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], int(upload_config["PORT_PUT"]) )
|
||||
except KeyError:
|
||||
pass
|
||||
putfile_sftp(upload_config["GET_MD_FILE_PATH"] + upload_config["GET_MD_FILE_NAME"], upload_config["PUT_MD_FILE_PATH"] + upload_config["PUT_MD_FILE_NAME"], upload_config["PUT_HOST"], upload_config["USERNAME_PUT"], upload_config["PASSWORD_PUT"], int(upload_config["PORT_PUT"]) )
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/service_helpers/PositionUtilities.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/BasePositionService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/MarketDataService.proto;api/services/MoneyFileService.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/position_cfg.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/AlgoTypes.proto;config/protos/ExchangeSimCfg.proto;config/protos/MarketData.proto;config/protos/Ports.proto;config/protos/Symbols.proto;config/protos/UI.proto;config/protos/cme_reference_data.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/position_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spreader.proto;config/protos/subprocess.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/sod.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;jetfix/codec/FIXArray.cpp;jetfix/common/OutFIX.cpp;jetfix/connection/AsyncReader.cpp;jetfix/connection/IConnection.cpp;jetfix/connection/SocketConnection.cpp;jetfix/gateway/CoreGateway.cpp;jetfix/gateway/JetFIXGateway.cpp;jetfix/gateway/Session.cpp;jetfix/store/FIXFileStore.cpp;jetfix/store/session_name.cpp;jetfix/tests/async_reader_tests.cpp;jetfix/tests/decoding_tests.cpp;jetfix/tests/fix_encoding_stream_tests.cpp;jetfix/tests/fix_fragment_tests.cpp;jetfix/tests/jetfix_performance_tests.cpp;jetfix/tests/sample_fix.cpp;jetfix/tests/store_tests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/Product.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityOracle.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/service/MarketDataServiceServer.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;mercury/actors/IPollableActor.cpp;mercury/broker/Broker.cpp;mercury/broker/BrokerProxy.cpp;mercury/broker/ILocalBroker.cpp;mercury/broker/IRemoteBroker.cpp;mercury/common/mercury_common.cpp;mercury/events/TimerEvent.cpp;mercury/executor/Executor.cpp;mercury/topics/Topic.cLine truncated
|
||||
set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/service_helpers/PositionUtilities.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/BasePositionService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/MarketDataService.proto;api/services/MoneyFileService.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/position_cfg.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/AlgoTypes.proto;config/protos/ExchangeSimCfg.proto;config/protos/MarketData.proto;config/protos/Ports.proto;config/protos/Symbols.proto;config/protos/UI.proto;config/protos/cme_reference_data.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/position_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spreader.proto;config/protos/subprocess.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/sod.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;jetfix/codec/FIXArray.cpp;jetfix/common/OutFIX.cpp;jetfix/connection/AsyncReader.cpp;jetfix/connection/IConnection.cpp;jetfix/connection/SocketConnection.cpp;jetfix/gateway/CoreGateway.cpp;jetfix/gateway/JetFIXGateway.cpp;jetfix/gateway/Session.cpp;jetfix/store/FIXFileStore.cpp;jetfix/store/session_name.cpp;jetfix/tests/async_reader_tests.cpp;jetfix/tests/decoding_tests.cpp;jetfix/tests/fix_encoding_stream_tests.cpp;jetfix/tests/fix_fragment_tests.cpp;jetfix/tests/jetfix_performance_tests.cpp;jetfix/tests/sample_fix.cpp;jetfix/tests/store_tests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/Product.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityOracle.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/service/MarketDataServiceServer.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;mercury/actors/IPollableActor.cpp;mercury/broker/Broker.cpp;mercury/broker/BrokerProxy.cpp;mercury/broker/ILocalBroker.cpp;mercury/broker/IRemoteBroker.cpp;mercury/common/mercury_common.cpp;mercury/events/TimerEvent.cpp;mercury/executor/Executor.cpp;mercury/topics/Topic.cLine truncated
|
||||
@@ -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)
|
||||
|
||||
+3
-28
@@ -60,13 +60,10 @@ class IntPrice {
|
||||
return delta.mantissa() < 0;
|
||||
}
|
||||
}
|
||||
bool operator <=(const IntPrice& other) const {
|
||||
bool operator <=(const IntPrice& other) {
|
||||
return *this == other || *this < other;
|
||||
}
|
||||
bool operator >(const IntPrice& other) const {
|
||||
return other < *this;
|
||||
}
|
||||
bool operator >=(const IntPrice& other) const {
|
||||
bool operator >=(const IntPrice& other) {
|
||||
return !(*this < other);
|
||||
}
|
||||
IntPrice operator - (const IntPrice& o) const {
|
||||
@@ -75,31 +72,9 @@ class IntPrice {
|
||||
IntPrice operator + (const IntPrice& o) const {
|
||||
return op(o, [](int64_t m1, int64_t m2) { return m1 + m2; });
|
||||
}
|
||||
IntPrice& operator +=(const IntPrice& o) {
|
||||
auto temp = *this + o;
|
||||
_mantissa = temp._mantissa;
|
||||
_exponent = temp._exponent;
|
||||
return *this;
|
||||
}
|
||||
IntPrice& operator -=(const IntPrice& o) {
|
||||
auto temp = *this - o;
|
||||
_mantissa = temp._mantissa;
|
||||
_exponent = temp._exponent;
|
||||
return *this;
|
||||
}
|
||||
IntPrice operator -() {
|
||||
return IntPrice(-_mantissa, _exponent);
|
||||
}
|
||||
IntPrice operator * (const IntPrice& other) const {
|
||||
return op(other, [](int64_t m1, int64_t m2) { return m1 * m2; });
|
||||
}
|
||||
IntPrice operator * (const int& other) const {
|
||||
return IntPrice(_mantissa * other, _exponent);
|
||||
}
|
||||
IntPrice& operator *=(const int& other) {
|
||||
_mantissa *= other;
|
||||
return *this;
|
||||
}
|
||||
IntPrice operator / (double v) const {
|
||||
return { (int64_t)(_mantissa / v), exponent() };
|
||||
}
|
||||
@@ -208,4 +183,4 @@ inline std::ostream& operator<<(std::ostream& os, const IntPrice& p) {
|
||||
return os;
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
@@ -235,7 +235,7 @@ void GLBXiLink3ExecutionGateway::on_admin_data(
|
||||
const mercury::Update<NewAdminDataEvent> &) {}
|
||||
|
||||
void GLBXiLink3ExecutionGateway::send_msgs(std::vector<OrderMsg> const &msgs,
|
||||
trace::CorID corid) {
|
||||
trace::CorID) {
|
||||
|
||||
if (me->state == State::READY) {
|
||||
for (auto &m : msgs) {
|
||||
@@ -248,11 +248,6 @@ void GLBXiLink3ExecutionGateway::send_msgs(std::vector<OrderMsg> const &msgs,
|
||||
// CancelReplace
|
||||
auto cancel_replace_ptr = std::get_if<CancelReplaceOrderMsg>(&m);
|
||||
if (cancel_replace_ptr) {
|
||||
LOG(iLink3,Info,"Cancel Replace. CorID:{}.{} Order:{}",
|
||||
log::CharPtrWrapper{corid.channel},
|
||||
corid.sn,
|
||||
cancel_replace_ptr->exchange_order_id);
|
||||
|
||||
me->gw->send_cancel_replace(*cancel_replace_ptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,26 +94,26 @@ class AvgPxInd
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
NoAveragePricing = (std::uint8_t)0,
|
||||
TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID = (std::uint8_t)1,
|
||||
TradeispartofaNotionalValueAveragePriceGroup = (std::uint8_t)3,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
NoAveragePricing = static_cast<std::uint8_t>(0),
|
||||
TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID = static_cast<std::uint8_t>(1),
|
||||
TradeispartofaNotionalValueAveragePriceGroup = static_cast<std::uint8_t>(3),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static AvgPxInd::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return NoAveragePricing;
|
||||
case 1: return TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID;
|
||||
case 3: return TradeispartofaNotionalValueAveragePriceGroup;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return NoAveragePricing;
|
||||
case static_cast<std::uint8_t>(1): return TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID;
|
||||
case static_cast<std::uint8_t>(3): return TradeispartofaNotionalValueAveragePriceGroup;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum AvgPxInd [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const AvgPxInd::Value value)
|
||||
static const char *c_str(const AvgPxInd::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class BooleanFlag
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
False = (std::uint8_t)0,
|
||||
True = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
False = static_cast<std::uint8_t>(0),
|
||||
True = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static BooleanFlag::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return False;
|
||||
case 1: return True;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return False;
|
||||
case static_cast<std::uint8_t>(1): return True;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum BooleanFlag [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const BooleanFlag::Value value)
|
||||
static const char *c_str(const BooleanFlag::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class BooleanNULL
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
False = (std::uint8_t)0,
|
||||
True = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
False = static_cast<std::uint8_t>(0),
|
||||
True = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static BooleanNULL::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return False;
|
||||
case 1: return True;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return False;
|
||||
case static_cast<std::uint8_t>(1): return True;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum BooleanNULL [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const BooleanNULL::Value value)
|
||||
static const char *c_str(const BooleanNULL::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
BusinessReject521() = default;
|
||||
|
||||
BusinessReject521(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)330;
|
||||
return static_cast<std::uint16_t>(330);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)521;
|
||||
return static_cast<std::uint16_t>(521);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "j";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
BusinessReject521 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = BusinessReject521(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
BusinessReject521 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
BusinessReject521 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -518,17 +519,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT
|
||||
@@ -582,7 +583,7 @@ public:
|
||||
throw std::runtime_error("length too large for getText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -595,7 +596,7 @@ public:
|
||||
SBE_NODISCARD std::string getTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -640,7 +641,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -652,14 +653,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
BusinessReject521 &putText(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -669,14 +670,14 @@ public:
|
||||
#else
|
||||
BusinessReject521 &putText(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -724,17 +725,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -788,7 +789,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -801,7 +802,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -846,7 +847,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -858,14 +859,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
BusinessReject521 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -875,14 +876,14 @@ public:
|
||||
#else
|
||||
BusinessReject521 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -891,7 +892,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -930,17 +931,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -962,7 +963,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1006,12 +1007,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1033,7 +1034,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * BusinessRejectRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *BusinessRejectRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1072,17 +1073,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t businessRejectRefIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t businessRejectRefIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1104,7 +1105,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1143,17 +1144,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1207,7 +1208,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1220,7 +1221,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 312;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1265,7 +1266,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 312;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1277,14 +1278,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
BusinessReject521 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 312, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 312 + start] = 0;
|
||||
}
|
||||
@@ -1294,14 +1295,14 @@ public:
|
||||
#else
|
||||
BusinessReject521 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 312, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 312 + start] = 0;
|
||||
}
|
||||
@@ -1310,7 +1311,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * RefSeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RefSeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1349,17 +1350,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t refSeqNumNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967295;
|
||||
return UINT32_C(0xffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t refSeqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t refSeqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t refSeqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1381,7 +1382,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RefTagIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RefTagIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1420,17 +1421,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t refTagIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t refTagIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t refTagIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t refTagIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1452,7 +1453,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * BusinessRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *BusinessRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1496,12 +1497,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t businessRejectReasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t businessRejectReasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t businessRejectReasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1523,7 +1524,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RefMsgTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RefMsgTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1562,17 +1563,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char refMsgTypeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char refMsgTypeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char refMsgTypeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t refMsgTypeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1626,7 +1627,7 @@ public:
|
||||
throw std::runtime_error("length too large for getRefMsgType [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 325, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 325, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1651,7 +1652,7 @@ public:
|
||||
SBE_NODISCARD std::string getRefMsgTypeAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 325;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 2 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1696,7 +1697,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getRefMsgTypeAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 325;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 2 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1708,14 +1709,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
BusinessReject521 &putRefMsgType(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
{
|
||||
throw std::runtime_error("string too large for putRefMsgType [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 325, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 2; ++start)
|
||||
for (std::size_t start = srcLength; start < 2; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 325 + start] = 0;
|
||||
}
|
||||
@@ -1725,14 +1726,14 @@ public:
|
||||
#else
|
||||
BusinessReject521 &putRefMsgType(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 2)
|
||||
{
|
||||
throw std::runtime_error("string too large for putRefMsgType [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 325, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 2; ++start)
|
||||
for (std::size_t start = srcLength; start < 2; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 325 + start] = 0;
|
||||
}
|
||||
@@ -1741,7 +1742,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1783,7 +1784,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t possRetransFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint8_t));
|
||||
@@ -1797,7 +1805,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1839,7 +1847,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdInd::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 328, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdInd::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 328, sizeof(std::uint8_t));
|
||||
@@ -1853,7 +1868,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1895,7 +1910,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint8_t));
|
||||
@@ -1998,13 +2020,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ClearingAcctType
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Customer = (std::uint8_t)0,
|
||||
Firm = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Customer = static_cast<std::uint8_t>(0),
|
||||
Firm = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ClearingAcctType::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Customer;
|
||||
case 1: return Firm;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Customer;
|
||||
case static_cast<std::uint8_t>(1): return Firm;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ClearingAcctType [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ClearingAcctType::Value value)
|
||||
static const char *c_str(const ClearingAcctType::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class CmtaGiveUpCD
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
GiveUp = (char)71,
|
||||
SGXoffset = (char)83,
|
||||
NULL_VALUE = (char)0
|
||||
GiveUp = static_cast<char>(71),
|
||||
SGXoffset = static_cast<char>(83),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static CmtaGiveUpCD::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 71: return GiveUp;
|
||||
case 83: return SGXoffset;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(71): return GiveUp;
|
||||
case static_cast<char>(83): return SGXoffset;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const CmtaGiveUpCD::Value value)
|
||||
static const char *c_str(const CmtaGiveUpCD::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,32 +94,32 @@ class CustOrdHandlInst
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
FCMprovidedscreen = (char)67,
|
||||
Otherprovidedscreen = (char)68,
|
||||
FCMAPIorFIX = (char)71,
|
||||
AlgoEngine = (char)72,
|
||||
DeskElectronic = (char)87,
|
||||
ClientElectronic = (char)89,
|
||||
NULL_VALUE = (char)0
|
||||
FCMprovidedscreen = static_cast<char>(67),
|
||||
Otherprovidedscreen = static_cast<char>(68),
|
||||
FCMAPIorFIX = static_cast<char>(71),
|
||||
AlgoEngine = static_cast<char>(72),
|
||||
DeskElectronic = static_cast<char>(87),
|
||||
ClientElectronic = static_cast<char>(89),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static CustOrdHandlInst::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 67: return FCMprovidedscreen;
|
||||
case 68: return Otherprovidedscreen;
|
||||
case 71: return FCMAPIorFIX;
|
||||
case 72: return AlgoEngine;
|
||||
case 87: return DeskElectronic;
|
||||
case 89: return ClientElectronic;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(67): return FCMprovidedscreen;
|
||||
case static_cast<char>(68): return Otherprovidedscreen;
|
||||
case static_cast<char>(71): return FCMAPIorFIX;
|
||||
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;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const CustOrdHandlInst::Value value)
|
||||
static const char *c_str(const CustOrdHandlInst::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,28 +94,28 @@ class CustOrderCapacity
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Membertradingfortheirownaccount = (std::uint8_t)1,
|
||||
Clearingfirmtradingforitsproprietaryaccount = (std::uint8_t)2,
|
||||
Membertradingforanothermember = (std::uint8_t)3,
|
||||
Allother = (std::uint8_t)4,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Membertradingfortheirownaccount = static_cast<std::uint8_t>(1),
|
||||
Clearingfirmtradingforitsproprietaryaccount = static_cast<std::uint8_t>(2),
|
||||
Membertradingforanothermember = static_cast<std::uint8_t>(3),
|
||||
Allother = static_cast<std::uint8_t>(4),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static CustOrderCapacity::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1: return Membertradingfortheirownaccount;
|
||||
case 2: return Clearingfirmtradingforitsproprietaryaccount;
|
||||
case 3: return Membertradingforanothermember;
|
||||
case 4: return Allother;
|
||||
case 255: return NULL_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>(4): return Allother;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum CustOrderCapacity [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const CustOrderCapacity::Value value)
|
||||
static const char *c_str(const CustOrderCapacity::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -245,12 +240,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t lengthMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t lengthMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t lengthEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * varDataMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *varDataMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -310,17 +305,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char varDataNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char varDataMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char varDataMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t varDataEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,36 +94,36 @@ class DKReason
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
UnknownSecurity = (char)65,
|
||||
WrongSide = (char)66,
|
||||
QuantityExceedsOrder = (char)67,
|
||||
NoMatchingOrder = (char)68,
|
||||
PriceExceedsLimit = (char)69,
|
||||
CalculationDifference = (char)70,
|
||||
NoMatchingExecutionReport = (char)71,
|
||||
Other = (char)90,
|
||||
NULL_VALUE = (char)0
|
||||
UnknownSecurity = static_cast<char>(65),
|
||||
WrongSide = static_cast<char>(66),
|
||||
QuantityExceedsOrder = static_cast<char>(67),
|
||||
NoMatchingOrder = static_cast<char>(68),
|
||||
PriceExceedsLimit = static_cast<char>(69),
|
||||
CalculationDifference = static_cast<char>(70),
|
||||
NoMatchingExecutionReport = static_cast<char>(71),
|
||||
Other = static_cast<char>(90),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static DKReason::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 65: return UnknownSecurity;
|
||||
case 66: return WrongSide;
|
||||
case 67: return QuantityExceedsOrder;
|
||||
case 68: return NoMatchingOrder;
|
||||
case 69: return PriceExceedsLimit;
|
||||
case 70: return CalculationDifference;
|
||||
case 71: return NoMatchingExecutionReport;
|
||||
case 90: return Other;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(65): return UnknownSecurity;
|
||||
case static_cast<char>(66): return WrongSide;
|
||||
case static_cast<char>(67): return QuantityExceedsOrder;
|
||||
case static_cast<char>(68): return NoMatchingOrder;
|
||||
case static_cast<char>(69): return PriceExceedsLimit;
|
||||
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;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum DKReason [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const DKReason::Value value)
|
||||
static const char *c_str(const DKReason::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -240,17 +235,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t mantissaNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t mantissaMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t mantissaMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -310,17 +305,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)127;
|
||||
return static_cast<std::int8_t>(127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)-127;
|
||||
return static_cast<std::int8_t>(-127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)127;
|
||||
return static_cast<std::int8_t>(127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -240,17 +235,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 9223372036854775807L;
|
||||
return INT64_C(9223372036854775807);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -9223372036854775807L;
|
||||
return INT64_C(-9223372036854775807);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 9223372036854775807L;
|
||||
return INT64_C(9223372036854775807);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -310,17 +305,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)127;
|
||||
return static_cast<std::int8_t>(127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)-127;
|
||||
return static_cast<std::int8_t>(-127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::int8_t)127;
|
||||
return static_cast<std::int8_t>(127);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
Establish503() = default;
|
||||
|
||||
Establish503(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)132;
|
||||
return static_cast<std::uint16_t>(132);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)503;
|
||||
return static_cast<std::uint16_t>(503);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "Establish";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
Establish503 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = Establish503(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
Establish503 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
Establish503 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -376,17 +377,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT
|
||||
@@ -401,14 +402,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *hMACVersion() const
|
||||
{
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54, 0 };
|
||||
|
||||
return (const char *)hMACVersionValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char hMACVersion(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54, 0 };
|
||||
|
||||
return (char)hMACVersionValues[index];
|
||||
}
|
||||
@@ -418,7 +419,7 @@ public:
|
||||
static std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(hMACVersionValues) ? length : sizeof(hMACVersionValues);
|
||||
|
||||
std::memcpy(dst, hMACVersionValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, hMACVersionValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -462,7 +463,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -501,17 +502,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT
|
||||
@@ -565,7 +566,7 @@ public:
|
||||
throw std::runtime_error("length too large for getHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -578,7 +579,7 @@ public:
|
||||
SBE_NODISCARD std::string getHMACSignatureAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 32 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -623,7 +624,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 32 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -635,14 +636,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putHMACSignature(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 32)
|
||||
{
|
||||
throw std::runtime_error("string too large for putHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 32; ++start)
|
||||
for (std::size_t start = srcLength; start < 32; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -652,14 +653,14 @@ public:
|
||||
#else
|
||||
Establish503 &putHMACSignature(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 32)
|
||||
{
|
||||
throw std::runtime_error("string too large for putHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 32; ++start)
|
||||
for (std::size_t start = srcLength; start < 32; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -668,7 +669,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -707,17 +708,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -771,7 +772,7 @@ public:
|
||||
throw std::runtime_error("length too large for getAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -784,7 +785,7 @@ public:
|
||||
SBE_NODISCARD std::string getAccessKeyIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 32;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -829,7 +830,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 32;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -841,14 +842,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putAccessKeyID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 32, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 32 + start] = 0;
|
||||
}
|
||||
@@ -858,14 +859,14 @@ public:
|
||||
#else
|
||||
Establish503 &putAccessKeyID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 32, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 32 + start] = 0;
|
||||
}
|
||||
@@ -874,7 +875,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * TradingSystemNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TradingSystemNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -913,17 +914,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemNameNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemNameMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemNameMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t tradingSystemNameEncodingLength() SBE_NOEXCEPT
|
||||
@@ -977,7 +978,7 @@ public:
|
||||
throw std::runtime_error("length too large for getTradingSystemName [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -990,7 +991,7 @@ public:
|
||||
SBE_NODISCARD std::string getTradingSystemNameAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 52;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 30 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1035,7 +1036,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTradingSystemNameAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 52;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 30 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1047,14 +1048,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putTradingSystemName(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 30)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemName [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 30; ++start)
|
||||
for (std::size_t start = srcLength; start < 30; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 52 + start] = 0;
|
||||
}
|
||||
@@ -1064,14 +1065,14 @@ public:
|
||||
#else
|
||||
Establish503 &putTradingSystemName(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 30)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemName [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 30; ++start)
|
||||
for (std::size_t start = srcLength; start < 30; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 52 + start] = 0;
|
||||
}
|
||||
@@ -1080,7 +1081,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * TradingSystemVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TradingSystemVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1119,17 +1120,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVersionNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVersionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVersionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t tradingSystemVersionEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1183,7 +1184,7 @@ public:
|
||||
throw std::runtime_error("length too large for getTradingSystemVersion [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 82, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 82, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1196,7 +1197,7 @@ public:
|
||||
SBE_NODISCARD std::string getTradingSystemVersionAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 82;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 10 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1241,7 +1242,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTradingSystemVersionAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 82;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 10 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1253,14 +1254,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putTradingSystemVersion(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemVersion [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 82, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 10; ++start)
|
||||
for (std::size_t start = srcLength; start < 10; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 82 + start] = 0;
|
||||
}
|
||||
@@ -1270,14 +1271,14 @@ public:
|
||||
#else
|
||||
Establish503 &putTradingSystemVersion(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemVersion [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 82, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 10; ++start)
|
||||
for (std::size_t start = srcLength; start < 10; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 82 + start] = 0;
|
||||
}
|
||||
@@ -1286,7 +1287,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * TradingSystemVendorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TradingSystemVendorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1325,17 +1326,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVendorNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVendorMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char tradingSystemVendorMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t tradingSystemVendorEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1389,7 +1390,7 @@ public:
|
||||
throw std::runtime_error("length too large for getTradingSystemVendor [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1402,7 +1403,7 @@ public:
|
||||
SBE_NODISCARD std::string getTradingSystemVendorAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 92;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 10 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1447,7 +1448,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTradingSystemVendorAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 92;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 10 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1459,14 +1460,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putTradingSystemVendor(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemVendor [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 92, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 10; ++start)
|
||||
for (std::size_t start = srcLength; start < 10; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 92 + start] = 0;
|
||||
}
|
||||
@@ -1476,14 +1477,14 @@ public:
|
||||
#else
|
||||
Establish503 &putTradingSystemVendor(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 10)
|
||||
{
|
||||
throw std::runtime_error("string too large for putTradingSystemVendor [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 92, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 10; ++start)
|
||||
for (std::size_t start = srcLength; start < 10; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 92 + start] = 0;
|
||||
}
|
||||
@@ -1492,7 +1493,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1536,12 +1537,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1563,7 +1564,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1607,12 +1608,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1634,7 +1635,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1678,12 +1679,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1705,7 +1706,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1744,17 +1745,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1808,7 +1809,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1836,7 +1837,7 @@ public:
|
||||
SBE_NODISCARD std::string getSessionAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 122;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 3 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1881,7 +1882,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSessionAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 122;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 3 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1893,14 +1894,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putSession(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 3)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 122, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 3; ++start)
|
||||
for (std::size_t start = srcLength; start < 3; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 122 + start] = 0;
|
||||
}
|
||||
@@ -1910,14 +1911,14 @@ public:
|
||||
#else
|
||||
Establish503 &putSession(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 3)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 122, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 3; ++start)
|
||||
for (std::size_t start = srcLength; start < 3; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 122 + start] = 0;
|
||||
}
|
||||
@@ -1926,7 +1927,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1965,17 +1966,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2029,7 +2030,7 @@ public:
|
||||
throw std::runtime_error("length too large for getFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 125, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 125, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -2042,7 +2043,7 @@ public:
|
||||
SBE_NODISCARD std::string getFirmAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 125;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -2087,7 +2088,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getFirmAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 125;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -2099,14 +2100,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putFirm(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 125, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 125 + start] = 0;
|
||||
}
|
||||
@@ -2116,14 +2117,14 @@ public:
|
||||
#else
|
||||
Establish503 &putFirm(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 125, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 125 + start] = 0;
|
||||
}
|
||||
@@ -2132,7 +2133,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2176,12 +2177,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2203,7 +2204,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2283,7 +2284,7 @@ public:
|
||||
std::uint64_t bytesToCopy = length < dataLength ? length : dataLength;
|
||||
std::uint64_t pos = sbePosition();
|
||||
sbePosition(pos + dataLength);
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -2372,7 +2373,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
Establish503 &putCredentials(const std::string_view str)
|
||||
@@ -2381,7 +2383,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
@@ -2466,21 +2469,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t CredentialsLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t credentialsLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += credentialsHeaderLength();
|
||||
if (CredentialsLength > 65534)
|
||||
if (credentialsLength > 65534LL)
|
||||
{
|
||||
throw std::runtime_error("CredentialsLength too long for length type [E109]");
|
||||
throw std::runtime_error("credentialsLength too long for length type [E109]");
|
||||
}
|
||||
length += CredentialsLength;
|
||||
length += credentialsLength;
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
EstablishmentAck504() = default;
|
||||
|
||||
EstablishmentAck504(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)38;
|
||||
return static_cast<std::uint16_t>(38);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)504;
|
||||
return static_cast<std::uint16_t>(504);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "EstablishmentAck";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
EstablishmentAck504 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = EstablishmentAck504(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
EstablishmentAck504 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
EstablishmentAck504 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -523,12 +524,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -550,7 +551,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -594,12 +595,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -621,7 +622,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -665,12 +666,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -692,7 +693,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -736,12 +737,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT
|
||||
@@ -763,7 +764,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -802,17 +803,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -834,7 +835,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -876,7 +877,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t faultToleranceIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint8_t));
|
||||
@@ -890,7 +898,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -932,7 +940,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 37, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 37, sizeof(std::uint8_t));
|
||||
@@ -1007,13 +1022,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
EstablishmentReject505() = default;
|
||||
|
||||
EstablishmentReject505(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)72;
|
||||
return static_cast<std::uint16_t>(72);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)505;
|
||||
return static_cast<std::uint16_t>(505);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "EstablishmentReject";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
EstablishmentReject505 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = EstablishmentReject505(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
EstablishmentReject505 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
EstablishmentReject505 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -376,17 +377,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -440,7 +441,7 @@ public:
|
||||
throw std::runtime_error("length too large for getReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -453,7 +454,7 @@ public:
|
||||
SBE_NODISCARD std::string getReasonAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 48 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -498,7 +499,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 48 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -510,14 +511,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
EstablishmentReject505 &putReason(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 48)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 48; ++start)
|
||||
for (std::size_t start = srcLength; start < 48; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -527,14 +528,14 @@ public:
|
||||
#else
|
||||
EstablishmentReject505 &putReason(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 48)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 48; ++start)
|
||||
for (std::size_t start = srcLength; start < 48; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -543,7 +544,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -587,12 +588,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -614,7 +615,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -658,12 +659,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -729,12 +730,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -756,7 +757,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -800,12 +801,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT
|
||||
@@ -827,7 +828,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -869,7 +870,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t faultToleranceIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t));
|
||||
@@ -883,7 +891,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -925,7 +933,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t));
|
||||
@@ -993,13 +1008,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ExecAckStatus
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Accepted = (std::uint8_t)1,
|
||||
Rejected = (std::uint8_t)2,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Accepted = static_cast<std::uint8_t>(1),
|
||||
Rejected = static_cast<std::uint8_t>(2),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ExecAckStatus::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1: return Accepted;
|
||||
case 2: return Rejected;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(1): return Accepted;
|
||||
case static_cast<std::uint8_t>(2): return Rejected;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExecAckStatus [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ExecAckStatus::Value value)
|
||||
static const char *c_str(const ExecAckStatus::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,12 +189,12 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
ExecInst &clear()
|
||||
@@ -231,208 +226,208 @@ public:
|
||||
|
||||
static bool aON(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 0u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 0u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t aON(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 0u)) : static_cast<std::uint8_t>(bits & ~(1u << 0u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 0u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 0u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool aON() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 0u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 0u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &aON(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 0u)) : static_cast<std::uint8_t>((bits) & ~(1u << 0u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 0u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 0u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool oB(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 1u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 1u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t oB(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 1u)) : static_cast<std::uint8_t>(bits & ~(1u << 1u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 1u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 1u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool oB() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 1u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 1u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &oB(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 1u)) : static_cast<std::uint8_t>((bits) & ~(1u << 1u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 1u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 1u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool nH(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 2u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 2u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t nH(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 2u)) : static_cast<std::uint8_t>(bits & ~(1u << 2u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 2u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 2u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool nH() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 2u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 2u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &nH(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 2u)) : static_cast<std::uint8_t>((bits) & ~(1u << 2u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 2u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 2u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool reserved1(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 3u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 3u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t reserved1(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 3u)) : static_cast<std::uint8_t>(bits & ~(1u << 3u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 3u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 3u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reserved1() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 3u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 3u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &reserved1(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 3u)) : static_cast<std::uint8_t>((bits) & ~(1u << 3u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 3u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 3u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool reserved2(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 4u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 4u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t reserved2(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 4u)) : static_cast<std::uint8_t>(bits & ~(1u << 4u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 4u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 4u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reserved2() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 4u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 4u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &reserved2(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 4u)) : static_cast<std::uint8_t>((bits) & ~(1u << 4u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 4u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 4u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool reserved3(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 5u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 5u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t reserved3(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 5u)) : static_cast<std::uint8_t>(bits & ~(1u << 5u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 5u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 5u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reserved3() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 5u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 5u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &reserved3(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 5u)) : static_cast<std::uint8_t>((bits) & ~(1u << 5u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 5u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 5u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool reserved4(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 6u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 6u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t reserved4(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 6u)) : static_cast<std::uint8_t>(bits & ~(1u << 6u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 6u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 6u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reserved4() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 6u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 6u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &reserved4(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 6u)) : static_cast<std::uint8_t>((bits) & ~(1u << 6u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 6u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 6u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
static bool reserved5(const std::uint8_t bits)
|
||||
{
|
||||
return (bits & (1u << 7u)) != 0;
|
||||
return (bits & (static_cast<std::uint8_t>(1) << 7u)) != 0;
|
||||
}
|
||||
|
||||
static std::uint8_t reserved5(const std::uint8_t bits, const bool value)
|
||||
{
|
||||
return value ? static_cast<std::uint8_t>(bits | (1u << 7u)) : static_cast<std::uint8_t>(bits & ~(1u << 7u));
|
||||
return value ? static_cast<std::uint8_t>(bits | (static_cast<std::uint8_t>(1) << 7u)) : static_cast<std::uint8_t>(bits & ~(static_cast<std::uint8_t>(1) << 7u));
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool reserved5() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
return ((val) & (1u << 7u)) != 0;
|
||||
return ((val) & (static_cast<std::uint8_t>(1) << 7u)) != 0;
|
||||
}
|
||||
|
||||
ExecInst &reserved5(const bool value)
|
||||
{
|
||||
std::uint8_t bits;
|
||||
std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (1u << 7u)) : static_cast<std::uint8_t>((bits) & ~(1u << 7u)));
|
||||
bits = (value ? static_cast<std::uint8_t>((bits) | (static_cast<std::uint8_t>(1) << 7u)) : static_cast<std::uint8_t>((bits) & ~(static_cast<std::uint8_t>(1) << 7u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ExecMode
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Aggressive = (char)65,
|
||||
Passive = (char)80,
|
||||
NULL_VALUE = (char)0
|
||||
Aggressive = static_cast<char>(65),
|
||||
Passive = static_cast<char>(80),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static ExecMode::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 65: return Aggressive;
|
||||
case 80: return Passive;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(65): return Aggressive;
|
||||
case static_cast<char>(80): return Passive;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExecMode [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ExecMode::Value value)
|
||||
static const char *c_str(const ExecMode::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,38 +94,38 @@ class ExecReason
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
MarketExchangeOption = (std::uint8_t)8,
|
||||
CancelledNotBest = (std::uint8_t)9,
|
||||
CancelOnDisconnect = (std::uint8_t)100,
|
||||
SelfMatchPreventionOldestOrderCancelled = (std::uint8_t)103,
|
||||
CancelOnGlobexCreditControlsViolation = (std::uint8_t)104,
|
||||
CancelFromFirmsoft = (std::uint8_t)105,
|
||||
CancelFromRiskManagementAPI = (std::uint8_t)106,
|
||||
SelfMatchPreventionNewestOrderCancelled = (std::uint8_t)107,
|
||||
Cancelduetovolquotedoptionorderrestedqtylessthanminordersize = (std::uint8_t)108,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
MarketExchangeOption = static_cast<std::uint8_t>(8),
|
||||
CancelledNotBest = static_cast<std::uint8_t>(9),
|
||||
CancelOnDisconnect = static_cast<std::uint8_t>(100),
|
||||
SelfMatchPreventionOldestOrderCancelled = static_cast<std::uint8_t>(103),
|
||||
CancelOnGlobexCreditControlsViolation = static_cast<std::uint8_t>(104),
|
||||
CancelFromFirmsoft = static_cast<std::uint8_t>(105),
|
||||
CancelFromRiskManagementAPI = static_cast<std::uint8_t>(106),
|
||||
SelfMatchPreventionNewestOrderCancelled = static_cast<std::uint8_t>(107),
|
||||
Cancelduetovolquotedoptionorderrestedqtylessthanminordersize = static_cast<std::uint8_t>(108),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ExecReason::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 8: return MarketExchangeOption;
|
||||
case 9: return CancelledNotBest;
|
||||
case 100: return CancelOnDisconnect;
|
||||
case 103: return SelfMatchPreventionOldestOrderCancelled;
|
||||
case 104: return CancelOnGlobexCreditControlsViolation;
|
||||
case 105: return CancelFromFirmsoft;
|
||||
case 106: return CancelFromRiskManagementAPI;
|
||||
case 107: return SelfMatchPreventionNewestOrderCancelled;
|
||||
case 108: return Cancelduetovolquotedoptionorderrestedqtylessthanminordersize;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(8): return MarketExchangeOption;
|
||||
case static_cast<std::uint8_t>(9): return CancelledNotBest;
|
||||
case static_cast<std::uint8_t>(100): return CancelOnDisconnect;
|
||||
case static_cast<std::uint8_t>(103): return SelfMatchPreventionOldestOrderCancelled;
|
||||
case static_cast<std::uint8_t>(104): return CancelOnGlobexCreditControlsViolation;
|
||||
case static_cast<std::uint8_t>(105): return CancelFromFirmsoft;
|
||||
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>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExecReason [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ExecReason::Value value)
|
||||
static const char *c_str(const ExecReason::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ExecTypTrdCxl
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
TradeCorrection = (char)71,
|
||||
TradeCancel = (char)72,
|
||||
NULL_VALUE = (char)0
|
||||
TradeCorrection = static_cast<char>(71),
|
||||
TradeCancel = static_cast<char>(72),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static ExecTypTrdCxl::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 71: return TradeCorrection;
|
||||
case 72: return TradeCancel;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(71): return TradeCorrection;
|
||||
case static_cast<char>(72): return TradeCancel;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExecTypTrdCxl [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ExecTypTrdCxl::Value value)
|
||||
static const char *c_str(const ExecTypTrdCxl::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
ExecutionAck539() = default;
|
||||
|
||||
ExecutionAck539(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)101;
|
||||
return static_cast<std::uint16_t>(101);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)539;
|
||||
return static_cast<std::uint16_t>(539);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "BN";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
ExecutionAck539 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = ExecutionAck539(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
ExecutionAck539 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
ExecutionAck539 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ExecAckStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExecAckStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -521,7 +522,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ExecAckStatus::Value execAckStatus() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t execAckStatusRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ExecAckStatus::Value execAckStatus() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
@@ -535,7 +543,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -579,12 +587,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -606,7 +614,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -645,17 +653,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -709,7 +717,7 @@ public:
|
||||
throw std::runtime_error("length too large for getClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -722,7 +730,7 @@ public:
|
||||
SBE_NODISCARD std::string getClOrdIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -767,7 +775,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -779,14 +787,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionAck539 &putClOrdID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -796,14 +804,14 @@ public:
|
||||
#else
|
||||
ExecutionAck539 &putClOrdID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -812,7 +820,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -856,12 +864,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -883,7 +891,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -930,7 +938,7 @@ public:
|
||||
return m_lastPx;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -974,12 +982,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1001,7 +1009,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1045,12 +1053,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1072,7 +1080,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DKReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DKReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1114,7 +1122,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD DKReason::Value dKReason() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD char dKReasonRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 65, sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD DKReason::Value dKReason() const
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 65, sizeof(char));
|
||||
@@ -1128,7 +1143,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1170,7 +1185,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t));
|
||||
@@ -1184,7 +1206,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1223,17 +1245,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1275,7 +1297,7 @@ public:
|
||||
|
||||
if (m_actingVersion < 4)
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
@@ -1307,7 +1329,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 67, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 67, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1320,7 +1342,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 67;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1365,7 +1387,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 67;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1377,14 +1399,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionAck539 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 67, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 67 + start] = 0;
|
||||
}
|
||||
@@ -1394,14 +1416,14 @@ public:
|
||||
#else
|
||||
ExecutionAck539 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 67, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 67 + start] = 0;
|
||||
}
|
||||
@@ -1410,7 +1432,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1454,12 +1476,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1471,7 +1493,7 @@ public:
|
||||
{
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
std::uint64_t val;
|
||||
@@ -1486,7 +1508,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1525,17 +1547,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1577,7 +1599,7 @@ public:
|
||||
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
@@ -1609,7 +1631,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 95, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 95, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1622,7 +1644,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 95;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1667,7 +1689,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 95;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1679,14 +1701,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
ExecutionAck539 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 95, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 95 + start] = 0;
|
||||
}
|
||||
@@ -1696,14 +1718,14 @@ public:
|
||||
#else
|
||||
ExecutionAck539 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 95, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 95 + start] = 0;
|
||||
}
|
||||
@@ -1712,7 +1734,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1754,7 +1776,19 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
@@ -1861,13 +1895,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+888
-194
File diff suppressed because it is too large.
Load diff
+317
-232
File diff suppressed because it is too large.
Load diff
+413
-183
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ExpCycle
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
ExpireOnTradingSessionClose = (std::uint8_t)0,
|
||||
Expirationatgivendate = (std::uint8_t)2,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
ExpireOnTradingSessionClose = static_cast<std::uint8_t>(0),
|
||||
Expirationatgivendate = static_cast<std::uint8_t>(2),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ExpCycle::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return ExpireOnTradingSessionClose;
|
||||
case 2: return Expirationatgivendate;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return ExpireOnTradingSessionClose;
|
||||
case static_cast<std::uint8_t>(2): return Expirationatgivendate;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ExpCycle [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ExpCycle::Value value)
|
||||
static const char *c_str(const ExpCycle::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class FTI
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Backup = (std::uint8_t)0,
|
||||
Primary = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Backup = static_cast<std::uint8_t>(0),
|
||||
Primary = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static FTI::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Backup;
|
||||
case 1: return Primary;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Backup;
|
||||
case static_cast<std::uint8_t>(1): return Primary;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum FTI [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const FTI::Value value)
|
||||
static const char *c_str(const FTI::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -245,12 +240,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -315,12 +310,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class KeepAliveLapsed
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
NotLapsed = (std::uint8_t)0,
|
||||
Lapsed = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
NotLapsed = static_cast<std::uint8_t>(0),
|
||||
Lapsed = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static KeepAliveLapsed::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return NotLapsed;
|
||||
case 1: return Lapsed;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return NotLapsed;
|
||||
case static_cast<std::uint8_t>(1): return Lapsed;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum KeepAliveLapsed [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const KeepAliveLapsed::Value value)
|
||||
static const char *c_str(const KeepAliveLapsed::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ListUpdAct
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Add = (char)65,
|
||||
Delete = (char)68,
|
||||
NULL_VALUE = (char)0
|
||||
Add = static_cast<char>(65),
|
||||
Delete = static_cast<char>(68),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static ListUpdAct::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 65: return Add;
|
||||
case 68: return Delete;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(65): return Add;
|
||||
case static_cast<char>(68): return Delete;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ListUpdAct [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ListUpdAct::Value value)
|
||||
static const char *c_str(const ListUpdAct::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ManualOrdInd
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Automated = (std::uint8_t)0,
|
||||
Manual = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Automated = static_cast<std::uint8_t>(0),
|
||||
Manual = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ManualOrdInd::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Automated;
|
||||
case 1: return Manual;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Automated;
|
||||
case static_cast<std::uint8_t>(1): return Manual;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ManualOrdInd [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ManualOrdInd::Value value)
|
||||
static const char *c_str(const ManualOrdInd::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class ManualOrdIndReq
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Automated = (std::uint8_t)0,
|
||||
Manual = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Automated = static_cast<std::uint8_t>(0),
|
||||
Manual = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static ManualOrdIndReq::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Automated;
|
||||
case 1: return Manual;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Automated;
|
||||
case static_cast<std::uint8_t>(1): return Manual;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum ManualOrdIndReq [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const ManualOrdIndReq::Value value)
|
||||
static const char *c_str(const ManualOrdIndReq::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class MassActionOrdTyp
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Limit = (char)50,
|
||||
StopLimit = (char)52,
|
||||
NULL_VALUE = (char)0
|
||||
Limit = static_cast<char>(50),
|
||||
StopLimit = static_cast<char>(52),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static MassActionOrdTyp::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 50: return Limit;
|
||||
case 52: return StopLimit;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(50): return Limit;
|
||||
case static_cast<char>(52): return StopLimit;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassActionOrdTyp::Value value)
|
||||
static const char *c_str(const MassActionOrdTyp::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class MassActionResponse
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Rejected = (std::uint8_t)0,
|
||||
Accepted = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Rejected = static_cast<std::uint8_t>(0),
|
||||
Accepted = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassActionResponse::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Rejected;
|
||||
case 1: return Accepted;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Rejected;
|
||||
case static_cast<std::uint8_t>(1): return Accepted;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassActionResponse [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassActionResponse::Value value)
|
||||
static const char *c_str(const MassActionResponse::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,30 +94,30 @@ class MassActionScope
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Instrument = (std::uint8_t)1,
|
||||
All = (std::uint8_t)7,
|
||||
MarketSegmentID = (std::uint8_t)9,
|
||||
InstrumentGroup = (std::uint8_t)10,
|
||||
QuoteSetID = (std::uint8_t)100,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Instrument = static_cast<std::uint8_t>(1),
|
||||
All = static_cast<std::uint8_t>(7),
|
||||
MarketSegmentID = static_cast<std::uint8_t>(9),
|
||||
InstrumentGroup = static_cast<std::uint8_t>(10),
|
||||
QuoteSetID = static_cast<std::uint8_t>(100),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassActionScope::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1: return Instrument;
|
||||
case 7: return All;
|
||||
case 9: return MarketSegmentID;
|
||||
case 10: return InstrumentGroup;
|
||||
case 100: return QuoteSetID;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(1): return Instrument;
|
||||
case static_cast<std::uint8_t>(7): return All;
|
||||
case static_cast<std::uint8_t>(9): return MarketSegmentID;
|
||||
case static_cast<std::uint8_t>(10): return InstrumentGroup;
|
||||
case static_cast<std::uint8_t>(100): return QuoteSetID;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassActionScope [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassActionScope::Value value)
|
||||
static const char *c_str(const MassActionScope::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,26 +94,26 @@ class MassCancelTIF
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Day = (std::uint8_t)0,
|
||||
GoodTillCancel = (std::uint8_t)1,
|
||||
GoodTillDate = (std::uint8_t)6,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Day = static_cast<std::uint8_t>(0),
|
||||
GoodTillCancel = static_cast<std::uint8_t>(1),
|
||||
GoodTillDate = static_cast<std::uint8_t>(6),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassCancelTIF::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Day;
|
||||
case 1: return GoodTillCancel;
|
||||
case 6: return GoodTillDate;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Day;
|
||||
case static_cast<std::uint8_t>(1): return GoodTillCancel;
|
||||
case static_cast<std::uint8_t>(6): return GoodTillDate;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassCancelTIF [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassCancelTIF::Value value)
|
||||
static const char *c_str(const MassCancelTIF::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class MassCxlReqTyp
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
SenderSubID = (std::uint8_t)100,
|
||||
Account = (std::uint8_t)101,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
SenderSubID = static_cast<std::uint8_t>(100),
|
||||
Account = static_cast<std::uint8_t>(101),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassCxlReqTyp::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 100: return SenderSubID;
|
||||
case 101: return Account;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(100): return SenderSubID;
|
||||
case static_cast<std::uint8_t>(101): return Account;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassCxlReqTyp [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassCxlReqTyp::Value value)
|
||||
static const char *c_str(const MassCxlReqTyp::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(92);
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
MassQuote517() = default;
|
||||
|
||||
MassQuote517(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)92;
|
||||
return static_cast<std::uint16_t>(92);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)517;
|
||||
return static_cast<std::uint16_t>(517);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "i";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
MassQuote517 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = MassQuote517(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
MassQuote517 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
MassQuote517 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -521,7 +522,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
@@ -535,7 +543,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -579,12 +587,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -606,7 +614,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -645,17 +653,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -709,7 +717,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -722,7 +730,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -767,7 +775,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -779,14 +787,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuote517 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -796,14 +804,14 @@ public:
|
||||
#else
|
||||
MassQuote517 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -812,7 +820,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -851,17 +859,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -883,7 +891,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -922,17 +930,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -986,7 +994,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -999,7 +1007,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 49;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1044,7 +1052,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 49;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1056,14 +1064,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuote517 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 49 + start] = 0;
|
||||
}
|
||||
@@ -1073,14 +1081,14 @@ public:
|
||||
#else
|
||||
MassQuote517 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 49 + start] = 0;
|
||||
}
|
||||
@@ -1089,7 +1097,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1133,12 +1141,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1160,7 +1168,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1204,12 +1212,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1231,7 +1239,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1273,7 +1281,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t mMProtectionResetRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t));
|
||||
@@ -1287,7 +1302,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1329,7 +1344,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t));
|
||||
@@ -1343,7 +1365,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1385,7 +1407,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t shortSaleTypeRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t));
|
||||
@@ -1399,7 +1428,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ReservedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ReservedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1438,17 +1467,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char reservedNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reservedMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reservedMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t reservedEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1490,7 +1519,7 @@ public:
|
||||
|
||||
if (m_actingVersion < 5)
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
char val;
|
||||
@@ -1522,7 +1551,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 62, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 62, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1535,7 +1564,7 @@ public:
|
||||
SBE_NODISCARD std::string getReservedAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 62;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 30 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1580,7 +1609,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getReservedAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 62;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 30 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1592,14 +1621,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuote517 &putReserved(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 30)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReserved [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 62, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 30; ++start)
|
||||
for (std::size_t start = srcLength; start < 30; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 62 + start] = 0;
|
||||
}
|
||||
@@ -1609,14 +1638,14 @@ public:
|
||||
#else
|
||||
MassQuote517 &putReserved(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 30)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReserved [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 62, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 30; ++start)
|
||||
for (std::size_t start = srcLength; start < 30; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 62 + start] = 0;
|
||||
}
|
||||
@@ -1683,8 +1712,8 @@ public:
|
||||
m_buffer = buffer;
|
||||
m_bufferLength = bufferLength;
|
||||
GroupSize dimensions(buffer, *pos, bufferLength, actingVersion);
|
||||
dimensions.blockLength((std::uint16_t)38);
|
||||
dimensions.numInGroup((std::uint8_t)count);
|
||||
dimensions.blockLength(static_cast<std::uint16_t>(38));
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(count));
|
||||
m_index = 0;
|
||||
m_count = count;
|
||||
m_blockLength = 38;
|
||||
@@ -1755,7 +1784,7 @@ public:
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
dimensions.numInGroup((std::uint8_t)m_count);
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(m_count));
|
||||
return m_count;
|
||||
}
|
||||
|
||||
@@ -1781,7 +1810,7 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * BidPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *BidPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1828,7 +1857,7 @@ public:
|
||||
return m_bidPx;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OfferPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OfferPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1875,7 +1904,7 @@ public:
|
||||
return m_offerPx;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1919,12 +1948,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1946,7 +1975,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1990,12 +2019,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2017,7 +2046,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2056,17 +2085,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t bidSizeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967295;
|
||||
return UINT32_C(0xffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t bidSizeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t bidSizeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t bidSizeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2088,7 +2117,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2127,17 +2156,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t offerSizeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967295;
|
||||
return UINT32_C(0xffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t offerSizeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t offerSizeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t offerSizeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2159,7 +2188,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UnderlyingSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UnderlyingSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2198,17 +2227,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t underlyingSecurityIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2230,7 +2259,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2274,12 +2303,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2351,13 +2380,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
@@ -2504,21 +2533,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoQuoteEntriesLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += NoQuoteEntries::sbeHeaderSize();
|
||||
if (NoQuoteEntriesLength > 254)
|
||||
if (noQuoteEntriesLength > 254LL)
|
||||
{
|
||||
throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]");
|
||||
throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]");
|
||||
}
|
||||
length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength();
|
||||
length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(350);
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
MassQuoteAck545() = default;
|
||||
|
||||
MassQuoteAck545(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)350;
|
||||
return static_cast<std::uint16_t>(350);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)545;
|
||||
return static_cast<std::uint16_t>(545);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "b";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
MassQuoteAck545 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = MassQuoteAck545(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
MassQuoteAck545 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
MassQuoteAck545 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -518,17 +519,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT
|
||||
@@ -582,7 +583,7 @@ public:
|
||||
throw std::runtime_error("length too large for getText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -595,7 +596,7 @@ public:
|
||||
SBE_NODISCARD std::string getTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -640,7 +641,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -652,14 +653,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuoteAck545 &putText(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -669,14 +670,14 @@ public:
|
||||
#else
|
||||
MassQuoteAck545 &putText(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -724,17 +725,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -788,7 +789,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -801,7 +802,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -846,7 +847,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -858,14 +859,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuoteAck545 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -875,14 +876,14 @@ public:
|
||||
#else
|
||||
MassQuoteAck545 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -891,7 +892,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -935,12 +936,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -962,7 +963,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1006,12 +1007,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1033,7 +1034,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1077,12 +1078,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1104,7 +1105,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1143,17 +1144,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1175,7 +1176,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1214,17 +1215,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1278,7 +1279,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 320, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 320, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1291,7 +1292,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 320;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1336,7 +1337,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 320;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1348,14 +1349,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
MassQuoteAck545 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 320, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 320 + start] = 0;
|
||||
}
|
||||
@@ -1365,14 +1366,14 @@ public:
|
||||
#else
|
||||
MassQuoteAck545 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 320, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 320 + start] = 0;
|
||||
}
|
||||
@@ -1381,7 +1382,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1425,12 +1426,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1452,7 +1453,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1491,17 +1492,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1523,7 +1524,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1562,17 +1563,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1594,7 +1595,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1636,7 +1637,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t quoteStatusRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t));
|
||||
@@ -1650,7 +1658,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1692,7 +1700,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t));
|
||||
@@ -1706,7 +1721,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1750,12 +1765,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1777,7 +1792,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1819,7 +1834,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t mMProtectionResetRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t));
|
||||
@@ -1833,7 +1855,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1875,7 +1897,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t));
|
||||
@@ -1889,7 +1918,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1931,7 +1960,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t));
|
||||
@@ -1945,7 +1981,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1987,7 +2023,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t shortSaleTypeRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t));
|
||||
@@ -2001,7 +2044,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2040,17 +2083,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)255;
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2072,7 +2115,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2114,7 +2157,19 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t possRetransFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
if (m_actingVersion < 2)
|
||||
{
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 341, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const
|
||||
{
|
||||
if (m_actingVersion < 2)
|
||||
{
|
||||
@@ -2133,7 +2188,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2172,17 +2227,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2194,7 +2249,7 @@ public:
|
||||
{
|
||||
if (m_actingVersion < 4)
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
std::uint64_t val;
|
||||
@@ -2267,8 +2322,8 @@ public:
|
||||
m_buffer = buffer;
|
||||
m_bufferLength = bufferLength;
|
||||
GroupSize dimensions(buffer, *pos, bufferLength, actingVersion);
|
||||
dimensions.blockLength((std::uint16_t)11);
|
||||
dimensions.numInGroup((std::uint8_t)count);
|
||||
dimensions.blockLength(static_cast<std::uint16_t>(11));
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(count));
|
||||
m_index = 0;
|
||||
m_count = count;
|
||||
m_blockLength = 11;
|
||||
@@ -2339,7 +2394,7 @@ public:
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
dimensions.numInGroup((std::uint8_t)m_count);
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(m_count));
|
||||
return m_count;
|
||||
}
|
||||
|
||||
@@ -2365,7 +2420,7 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2409,12 +2464,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2436,7 +2491,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2480,12 +2535,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2507,7 +2562,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2551,12 +2606,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2578,7 +2633,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2622,12 +2677,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2683,13 +2738,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
@@ -2872,21 +2927,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoQuoteEntriesLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += NoQuoteEntries::sbeHeaderSize();
|
||||
if (NoQuoteEntriesLength > 254)
|
||||
if (noQuoteEntriesLength > 254LL)
|
||||
{
|
||||
throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]");
|
||||
throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]");
|
||||
}
|
||||
length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength();
|
||||
length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class MassStatusOrdTyp
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
SenderSubID = (std::uint8_t)100,
|
||||
Account = (std::uint8_t)101,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
SenderSubID = static_cast<std::uint8_t>(100),
|
||||
Account = static_cast<std::uint8_t>(101),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassStatusOrdTyp::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 100: return SenderSubID;
|
||||
case 101: return Account;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(100): return SenderSubID;
|
||||
case static_cast<std::uint8_t>(101): return Account;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassStatusOrdTyp [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassStatusOrdTyp::Value value)
|
||||
static const char *c_str(const MassStatusOrdTyp::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,26 +94,26 @@ class MassStatusReqTyp
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Instrument = (std::uint8_t)1,
|
||||
InstrumentGroup = (std::uint8_t)3,
|
||||
MarketSegment = (std::uint8_t)100,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Instrument = static_cast<std::uint8_t>(1),
|
||||
InstrumentGroup = static_cast<std::uint8_t>(3),
|
||||
MarketSegment = static_cast<std::uint8_t>(100),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassStatusReqTyp::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1: return Instrument;
|
||||
case 3: return InstrumentGroup;
|
||||
case 100: return MarketSegment;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(1): return Instrument;
|
||||
case static_cast<std::uint8_t>(3): return InstrumentGroup;
|
||||
case static_cast<std::uint8_t>(100): return MarketSegment;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassStatusReqTyp [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassStatusReqTyp::Value value)
|
||||
static const char *c_str(const MassStatusReqTyp::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,32 +94,35 @@ class MassStatusTIF
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Day = (std::uint8_t)0,
|
||||
GTC = (std::uint8_t)1,
|
||||
GTD = (std::uint8_t)6,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Day = static_cast<std::uint8_t>(0),
|
||||
GTC = static_cast<std::uint8_t>(1),
|
||||
GTD = static_cast<std::uint8_t>(6),
|
||||
GFS = static_cast<std::uint8_t>(99),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static MassStatusTIF::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Day;
|
||||
case 1: return GTC;
|
||||
case 6: return GTD;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Day;
|
||||
case static_cast<std::uint8_t>(1): return GTC;
|
||||
case static_cast<std::uint8_t>(6): return GTD;
|
||||
case static_cast<std::uint8_t>(99): return GFS;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum MassStatusTIF [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const MassStatusTIF::Value value)
|
||||
static const char *c_str(const MassStatusTIF::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case Day: return "Day";
|
||||
case GTC: return "GTC";
|
||||
case GTD: return "GTD";
|
||||
case GFS: return "GFS";
|
||||
case NULL_VALUE: return "NULL_VALUE";
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -240,17 +235,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t yearNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t yearMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t yearMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t yearEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -310,17 +305,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t monthNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)255;
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t monthMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t monthMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t monthEncodingLength() SBE_NOEXCEPT
|
||||
@@ -342,7 +337,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -380,17 +375,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t dayNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)255;
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t dayMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t dayMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t dayEncodingLength() SBE_NOEXCEPT
|
||||
@@ -412,7 +407,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -450,17 +445,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t weekNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)255;
|
||||
return static_cast<std::uint8_t>(255);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t weekMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)0;
|
||||
return static_cast<std::uint8_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint8_t weekMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint8_t)254;
|
||||
return static_cast<std::uint8_t>(254);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t weekEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -172,12 +167,12 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -194,15 +189,15 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -245,12 +240,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT
|
||||
@@ -272,7 +267,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -315,12 +310,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t templateIdMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t templateIdMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t templateIdEncodingLength() SBE_NOEXCEPT
|
||||
@@ -342,7 +337,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -385,12 +380,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t schemaIdMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t schemaIdMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t schemaIdEncodingLength() SBE_NOEXCEPT
|
||||
@@ -412,7 +407,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -455,12 +450,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t versionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t versionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t versionEncodingLength() SBE_NOEXCEPT
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
Negotiate500() = default;
|
||||
|
||||
Negotiate500(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)76;
|
||||
return static_cast<std::uint16_t>(76);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)500;
|
||||
return static_cast<std::uint16_t>(500);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "Negotiate";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
Negotiate500 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = Negotiate500(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
Negotiate500 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
Negotiate500 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CustomerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CustomerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -376,17 +377,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char customerFlowNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char customerFlowMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char customerFlowMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t customerFlowEncodingLength() SBE_NOEXCEPT
|
||||
@@ -401,14 +402,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *customerFlow() const
|
||||
{
|
||||
static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 };
|
||||
static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84, 0 };
|
||||
|
||||
return (const char *)customerFlowValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char customerFlow(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 };
|
||||
static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84, 0 };
|
||||
|
||||
return (char)customerFlowValues[index];
|
||||
}
|
||||
@@ -418,7 +419,7 @@ public:
|
||||
static std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(customerFlowValues) ? length : sizeof(customerFlowValues);
|
||||
|
||||
std::memcpy(dst, customerFlowValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, customerFlowValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -462,7 +463,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -501,17 +502,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT
|
||||
@@ -526,14 +527,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *hMACVersion() const
|
||||
{
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54, 0 };
|
||||
|
||||
return (const char *)hMACVersionValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char hMACVersion(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54, 0 };
|
||||
|
||||
return (char)hMACVersionValues[index];
|
||||
}
|
||||
@@ -543,7 +544,7 @@ public:
|
||||
static std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(hMACVersionValues) ? length : sizeof(hMACVersionValues);
|
||||
|
||||
std::memcpy(dst, hMACVersionValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, hMACVersionValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -587,7 +588,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -626,17 +627,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT
|
||||
@@ -690,7 +691,7 @@ public:
|
||||
throw std::runtime_error("length too large for getHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -703,7 +704,7 @@ public:
|
||||
SBE_NODISCARD std::string getHMACSignatureAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 32 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -748,7 +749,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 32 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -760,14 +761,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Negotiate500 &putHMACSignature(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 32)
|
||||
{
|
||||
throw std::runtime_error("string too large for putHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 32; ++start)
|
||||
for (std::size_t start = srcLength; start < 32; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -777,14 +778,14 @@ public:
|
||||
#else
|
||||
Negotiate500 &putHMACSignature(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 32)
|
||||
{
|
||||
throw std::runtime_error("string too large for putHMACSignature [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 32; ++start)
|
||||
for (std::size_t start = srcLength; start < 32; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -793,7 +794,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -832,17 +833,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -896,7 +897,7 @@ public:
|
||||
throw std::runtime_error("length too large for getAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -909,7 +910,7 @@ public:
|
||||
SBE_NODISCARD std::string getAccessKeyIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 32;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -954,7 +955,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 32;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -966,14 +967,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Negotiate500 &putAccessKeyID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 32, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 32 + start] = 0;
|
||||
}
|
||||
@@ -983,14 +984,14 @@ public:
|
||||
#else
|
||||
Negotiate500 &putAccessKeyID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putAccessKeyID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 32, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 32 + start] = 0;
|
||||
}
|
||||
@@ -999,7 +1000,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1043,12 +1044,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1070,7 +1071,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1114,12 +1115,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1141,7 +1142,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1180,17 +1181,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1244,7 +1245,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 68, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 68, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1272,7 +1273,7 @@ public:
|
||||
SBE_NODISCARD std::string getSessionAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 68;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 3 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1317,7 +1318,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSessionAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 68;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 3 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1329,14 +1330,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Negotiate500 &putSession(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 3)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 68, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 3; ++start)
|
||||
for (std::size_t start = srcLength; start < 3; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 68 + start] = 0;
|
||||
}
|
||||
@@ -1346,14 +1347,14 @@ public:
|
||||
#else
|
||||
Negotiate500 &putSession(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 3)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSession [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 68, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 3; ++start)
|
||||
for (std::size_t start = srcLength; start < 3; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 68 + start] = 0;
|
||||
}
|
||||
@@ -1362,7 +1363,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1401,17 +1402,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1465,7 +1466,7 @@ public:
|
||||
throw std::runtime_error("length too large for getFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 71, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 71, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1478,7 +1479,7 @@ public:
|
||||
SBE_NODISCARD std::string getFirmAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 71;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1523,7 +1524,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getFirmAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 71;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1535,14 +1536,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
Negotiate500 &putFirm(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 71, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 71 + start] = 0;
|
||||
}
|
||||
@@ -1552,14 +1553,14 @@ public:
|
||||
#else
|
||||
Negotiate500 &putFirm(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putFirm [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 71, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 71 + start] = 0;
|
||||
}
|
||||
@@ -1568,7 +1569,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1648,7 +1649,7 @@ public:
|
||||
std::uint64_t bytesToCopy = length < dataLength ? length : dataLength;
|
||||
std::uint64_t pos = sbePosition();
|
||||
sbePosition(pos + dataLength);
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1737,7 +1738,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
Negotiate500 &putCredentials(const std::string_view str)
|
||||
@@ -1746,7 +1748,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
@@ -1808,21 +1811,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t CredentialsLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t credentialsLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += credentialsHeaderLength();
|
||||
if (CredentialsLength > 65534)
|
||||
if (credentialsLength > 65534LL)
|
||||
{
|
||||
throw std::runtime_error("CredentialsLength too long for length type [E109]");
|
||||
throw std::runtime_error("credentialsLength too long for length type [E109]");
|
||||
}
|
||||
length += CredentialsLength;
|
||||
length += credentialsLength;
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
NegotiationReject502() = default;
|
||||
|
||||
NegotiationReject502(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)68;
|
||||
return static_cast<std::uint16_t>(68);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)502;
|
||||
return static_cast<std::uint16_t>(502);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "NegotiationReject";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
NegotiationReject502 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = NegotiationReject502(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
NegotiationReject502 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
NegotiationReject502 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -376,17 +377,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -440,7 +441,7 @@ public:
|
||||
throw std::runtime_error("length too large for getReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -453,7 +454,7 @@ public:
|
||||
SBE_NODISCARD std::string getReasonAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 48 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -498,7 +499,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 48 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -510,14 +511,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NegotiationReject502 &putReason(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 48)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 48; ++start)
|
||||
for (std::size_t start = srcLength; start < 48; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -527,14 +528,14 @@ public:
|
||||
#else
|
||||
NegotiationReject502 &putReason(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 48)
|
||||
{
|
||||
throw std::runtime_error("string too large for putReason [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 48; ++start)
|
||||
for (std::size_t start = srcLength; start < 48; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -543,7 +544,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -587,12 +588,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -614,7 +615,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -658,12 +659,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -729,12 +730,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT
|
||||
@@ -756,7 +757,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -798,7 +799,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t faultToleranceIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t));
|
||||
@@ -812,7 +820,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -854,7 +862,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t));
|
||||
@@ -918,13 +933,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
NegotiationResponse501() = default;
|
||||
|
||||
NegotiationResponse501(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)32;
|
||||
return static_cast<std::uint16_t>(32);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)501;
|
||||
return static_cast<std::uint16_t>(501);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "NegotiationResponse";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
NegotiationResponse501 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = NegotiationResponse501(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
NegotiationResponse501 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
NegotiationResponse501 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ServerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ServerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -376,17 +377,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char serverFlowNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char serverFlowMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char serverFlowMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t serverFlowEncodingLength() SBE_NOEXCEPT
|
||||
@@ -401,14 +402,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *serverFlow() const
|
||||
{
|
||||
static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 };
|
||||
static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69, 0 };
|
||||
|
||||
return (const char *)serverFlowValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char serverFlow(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 };
|
||||
static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69, 0 };
|
||||
|
||||
return (char)serverFlowValues[index];
|
||||
}
|
||||
@@ -418,7 +419,7 @@ public:
|
||||
static std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(serverFlowValues) ? length : sizeof(serverFlowValues);
|
||||
|
||||
std::memcpy(dst, serverFlowValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, serverFlowValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -462,7 +463,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -506,12 +507,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -533,7 +534,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -577,12 +578,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
|
||||
@@ -604,7 +605,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -643,17 +644,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -675,7 +676,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -717,7 +718,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t faultToleranceIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD FTI::Value faultToleranceIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t));
|
||||
@@ -731,7 +739,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -773,7 +781,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t));
|
||||
@@ -787,7 +802,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -831,12 +846,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -858,7 +873,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -902,12 +917,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -929,7 +944,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1009,7 +1024,7 @@ public:
|
||||
std::uint64_t bytesToCopy = length < dataLength ? length : dataLength;
|
||||
std::uint64_t pos = sbePosition();
|
||||
sbePosition(pos + dataLength);
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, m_buffer + pos, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1098,7 +1113,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
NegotiationResponse501 &putCredentials(const std::string_view str)
|
||||
@@ -1107,7 +1123,8 @@ public:
|
||||
{
|
||||
throw std::runtime_error("std::string too long for length type [E109]");
|
||||
}
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length())); }
|
||||
return putCredentials(str.data(), static_cast<std::uint16_t>(str.length()));
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
@@ -1169,21 +1186,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t CredentialsLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t credentialsLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += credentialsHeaderLength();
|
||||
if (CredentialsLength > 65534)
|
||||
if (credentialsLength > 65534LL)
|
||||
{
|
||||
throw std::runtime_error("CredentialsLength too long for length type [E109]");
|
||||
throw std::runtime_error("credentialsLength too long for length type [E109]");
|
||||
}
|
||||
length += CredentialsLength;
|
||||
length += credentialsLength;
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
NewOrderCross544() = default;
|
||||
|
||||
NewOrderCross544(
|
||||
@@ -218,32 +220,32 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)74;
|
||||
return static_cast<std::uint16_t>(74);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)544;
|
||||
return static_cast<std::uint16_t>(544);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "c";
|
||||
return "s";
|
||||
}
|
||||
|
||||
SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
NewOrderCross544 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = NewOrderCross544(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
NewOrderCross544 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
NewOrderCross544 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -521,7 +522,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
@@ -535,7 +543,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -579,12 +587,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -606,7 +614,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -645,17 +653,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -709,7 +717,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -722,7 +730,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -767,7 +775,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -779,14 +787,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NewOrderCross544 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -796,14 +804,14 @@ public:
|
||||
#else
|
||||
NewOrderCross544 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -812,7 +820,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -851,17 +859,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char ordTypeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordTypeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordTypeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -876,14 +884,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *ordType() const
|
||||
{
|
||||
static const std::uint8_t ordTypeValues[] = { 50 };
|
||||
static const std::uint8_t ordTypeValues[] = { 50, 0 };
|
||||
|
||||
return (const char *)ordTypeValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char ordType(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t ordTypeValues[] = { 50 };
|
||||
static const std::uint8_t ordTypeValues[] = { 50, 0 };
|
||||
|
||||
return (char)ordTypeValues[index];
|
||||
}
|
||||
@@ -893,7 +901,7 @@ public:
|
||||
static std::uint8_t ordTypeValues[] = { 50 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(ordTypeValues) ? length : sizeof(ordTypeValues);
|
||||
|
||||
std::memcpy(dst, ordTypeValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, ordTypeValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -937,7 +945,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -976,17 +984,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char crossTypeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char crossTypeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char crossTypeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1001,14 +1009,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *crossType() const
|
||||
{
|
||||
static const std::uint8_t crossTypeValues[] = { 51 };
|
||||
static const std::uint8_t crossTypeValues[] = { 51, 0 };
|
||||
|
||||
return (const char *)crossTypeValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char crossType(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t crossTypeValues[] = { 51 };
|
||||
static const std::uint8_t crossTypeValues[] = { 51, 0 };
|
||||
|
||||
return (char)crossTypeValues[index];
|
||||
}
|
||||
@@ -1018,7 +1026,7 @@ public:
|
||||
static std::uint8_t crossTypeValues[] = { 51 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(crossTypeValues) ? length : sizeof(crossTypeValues);
|
||||
|
||||
std::memcpy(dst, crossTypeValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, crossTypeValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1062,7 +1070,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CrossPrioritizationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CrossPrioritizationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1101,17 +1109,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char crossPrioritizationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char crossPrioritizationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char crossPrioritizationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t crossPrioritizationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1126,14 +1134,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *crossPrioritization() const
|
||||
{
|
||||
static const std::uint8_t crossPrioritizationValues[] = { 48 };
|
||||
static const std::uint8_t crossPrioritizationValues[] = { 48, 0 };
|
||||
|
||||
return (const char *)crossPrioritizationValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char crossPrioritization(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t crossPrioritizationValues[] = { 48 };
|
||||
static const std::uint8_t crossPrioritizationValues[] = { 48, 0 };
|
||||
|
||||
return (char)crossPrioritizationValues[index];
|
||||
}
|
||||
@@ -1143,7 +1151,7 @@ public:
|
||||
static std::uint8_t crossPrioritizationValues[] = { 48 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(crossPrioritizationValues) ? length : sizeof(crossPrioritizationValues);
|
||||
|
||||
std::memcpy(dst, crossPrioritizationValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, crossPrioritizationValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1187,7 +1195,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1234,7 +1242,7 @@ public:
|
||||
return m_price;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TransBkdTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TransBkdTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1278,12 +1286,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transBkdTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transBkdTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t transBkdTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1305,7 +1313,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1349,12 +1357,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1376,7 +1384,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1415,17 +1423,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1479,7 +1487,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1500,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 65;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1537,7 +1545,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 65;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1549,14 +1557,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NewOrderCross544 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 65 + start] = 0;
|
||||
}
|
||||
@@ -1566,14 +1574,14 @@ public:
|
||||
#else
|
||||
NewOrderCross544 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 65 + start] = 0;
|
||||
}
|
||||
@@ -1582,7 +1590,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1626,12 +1634,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1711,8 +1719,8 @@ public:
|
||||
m_buffer = buffer;
|
||||
m_bufferLength = bufferLength;
|
||||
GroupSize dimensions(buffer, *pos, bufferLength, actingVersion);
|
||||
dimensions.blockLength((std::uint16_t)34);
|
||||
dimensions.numInGroup((std::uint8_t)count);
|
||||
dimensions.blockLength(static_cast<std::uint16_t>(34));
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(count));
|
||||
m_index = 0;
|
||||
m_count = count;
|
||||
m_blockLength = 34;
|
||||
@@ -1783,7 +1791,7 @@ public:
|
||||
{
|
||||
m_count = m_index;
|
||||
GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion);
|
||||
dimensions.numInGroup((std::uint8_t)m_count);
|
||||
dimensions.numInGroup(static_cast<std::uint8_t>(m_count));
|
||||
return m_count;
|
||||
}
|
||||
|
||||
@@ -1809,7 +1817,7 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1848,17 +1856,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1912,7 +1920,7 @@ public:
|
||||
throw std::runtime_error("length too large for getClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1925,7 +1933,7 @@ public:
|
||||
SBE_NODISCARD std::string getClOrdIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1970,7 +1978,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 0;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1982,14 +1990,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NoSides &putClOrdID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -1999,14 +2007,14 @@ public:
|
||||
#else
|
||||
NoSides &putClOrdID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 0 + start] = 0;
|
||||
}
|
||||
@@ -2015,7 +2023,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2059,12 +2067,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2086,7 +2094,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2130,12 +2138,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2157,7 +2165,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2199,7 +2207,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t));
|
||||
@@ -2213,7 +2228,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SideTimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SideTimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2255,7 +2270,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideTimeInForce::Value sideTimeInForce() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t sideTimeInForceRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 33, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideTimeInForce::Value sideTimeInForce() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 33, sizeof(std::uint8_t));
|
||||
@@ -2308,13 +2330,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
@@ -2448,21 +2470,21 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return false;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoSidesLength = 0)
|
||||
SBE_NODISCARD static std::size_t computeLength(std::size_t noSidesLength = 0)
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
length += NoSides::sbeHeaderSize();
|
||||
if (NoSidesLength > 254)
|
||||
if (noSidesLength > 254LL)
|
||||
{
|
||||
throw std::runtime_error("NoSidesLength outside of allowed range [E110]");
|
||||
throw std::runtime_error("noSidesLength outside of allowed range [E110]");
|
||||
}
|
||||
length += NoSidesLength * NoSides::sbeBlockLength();
|
||||
length += noSidesLength *NoSides::sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(124);
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
NewOrderSingle514() = default;
|
||||
|
||||
NewOrderSingle514(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)116;
|
||||
return static_cast<std::uint16_t>(124);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)514;
|
||||
return static_cast<std::uint16_t>(514);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "D";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
NewOrderSingle514 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = NewOrderSingle514(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
NewOrderSingle514 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
NewOrderSingle514 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -384,7 +385,7 @@ public:
|
||||
return m_price;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -428,12 +429,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT
|
||||
@@ -455,7 +456,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -499,12 +500,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return -2147483647;
|
||||
return INT32_C(-2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 2147483647;
|
||||
return INT32_C(2147483647);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -526,7 +527,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -568,7 +569,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SideReq::Value side() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
@@ -582,7 +590,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -626,12 +634,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -653,7 +661,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -692,17 +700,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -756,7 +764,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -769,7 +777,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -814,7 +822,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 21;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -826,14 +834,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NewOrderSingle514 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -843,14 +851,14 @@ public:
|
||||
#else
|
||||
NewOrderSingle514 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 21 + start] = 0;
|
||||
}
|
||||
@@ -859,7 +867,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -898,17 +906,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -962,7 +970,7 @@ public:
|
||||
throw std::runtime_error("length too large for getClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -975,7 +983,7 @@ public:
|
||||
SBE_NODISCARD std::string getClOrdIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 41;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1020,7 +1028,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 41;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1032,14 +1040,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NewOrderSingle514 &putClOrdID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 41 + start] = 0;
|
||||
}
|
||||
@@ -1049,14 +1057,14 @@ public:
|
||||
#else
|
||||
NewOrderSingle514 &putClOrdID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 41 + start] = 0;
|
||||
}
|
||||
@@ -1065,7 +1073,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1109,12 +1117,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1136,7 +1144,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1180,12 +1188,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1207,7 +1215,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1251,12 +1259,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1278,7 +1286,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1325,7 +1333,7 @@ public:
|
||||
return m_stopPx;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1364,17 +1372,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1428,7 +1436,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 93, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 93, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1441,7 +1449,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 93;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1486,7 +1494,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 93;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1498,14 +1506,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
NewOrderSingle514 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 93, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 93 + start] = 0;
|
||||
}
|
||||
@@ -1515,14 +1523,14 @@ public:
|
||||
#else
|
||||
NewOrderSingle514 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 93, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 93 + start] = 0;
|
||||
}
|
||||
@@ -1531,7 +1539,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1570,17 +1578,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967295;
|
||||
return UINT32_C(0xffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1602,7 +1610,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1641,17 +1649,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967295;
|
||||
return UINT32_C(0xffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1673,7 +1681,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1712,17 +1720,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1744,7 +1752,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1786,7 +1794,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD OrderTypeReq::Value ordType() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD char ordTypeRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 108, sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD OrderTypeReq::Value ordType() const
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 108, sizeof(char));
|
||||
@@ -1800,7 +1815,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1842,7 +1857,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t timeInForceRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD TimeInForce::Value timeInForce() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t));
|
||||
@@ -1856,7 +1878,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1898,7 +1920,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t));
|
||||
@@ -1912,7 +1941,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1964,7 +1993,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2006,7 +2035,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD char executionModeRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 112, sizeof(char));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ExecMode::Value executionMode() const
|
||||
{
|
||||
char val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 112, sizeof(char));
|
||||
@@ -2020,7 +2056,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2062,7 +2098,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 113, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 113, sizeof(std::uint8_t));
|
||||
@@ -2076,7 +2119,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2118,7 +2161,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t managedOrderRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value managedOrder() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint8_t));
|
||||
@@ -2132,7 +2182,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2174,7 +2224,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t shortSaleTypeRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 115, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ShortSaleType::Value shortSaleType() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 115, sizeof(std::uint8_t));
|
||||
@@ -2188,6 +2245,53 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char *DiscretionPriceMetaAttribute(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 discretionPriceId() SBE_NOEXCEPT
|
||||
{
|
||||
return 845;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t discretionPriceSinceVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
SBE_NODISCARD bool discretionPriceInActingVersion() SBE_NOEXCEPT
|
||||
{
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
#endif
|
||||
return m_actingVersion >= discretionPriceSinceVersion();
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::size_t discretionPriceEncodingOffset() SBE_NOEXCEPT
|
||||
{
|
||||
return 116;
|
||||
}
|
||||
|
||||
private:
|
||||
PRICENULL9 m_discretionPrice;
|
||||
|
||||
public:
|
||||
SBE_NODISCARD PRICENULL9 &discretionPrice()
|
||||
{
|
||||
m_discretionPrice.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength);
|
||||
return m_discretionPrice;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
std::basic_ostream<CharT, Traits>& builder, NewOrderSingle514 _writer)
|
||||
@@ -2294,6 +2398,10 @@ friend std::basic_ostream<CharT, Traits>& operator << (
|
||||
builder << R"("ShortSaleType": )";
|
||||
builder << '"' << writer.shortSaleType() << '"';
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("DiscretionPrice": )";
|
||||
builder << writer.discretionPrice();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
@@ -2308,13 +2416,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
NotApplied513() = default;
|
||||
|
||||
NotApplied513(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)17;
|
||||
return static_cast<std::uint16_t>(17);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)513;
|
||||
return static_cast<std::uint16_t>(513);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "NotApplied";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
NotApplied513 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = NotApplied513(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
NotApplied513 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
NotApplied513 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -523,12 +524,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t msgCountMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t msgCountMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT
|
||||
@@ -550,7 +551,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -592,7 +593,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t));
|
||||
@@ -647,13 +655,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class OFMOverrideReq
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
Disabled = (std::uint8_t)0,
|
||||
Enabled = (std::uint8_t)1,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
Disabled = static_cast<std::uint8_t>(0),
|
||||
Enabled = static_cast<std::uint8_t>(1),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static OFMOverrideReq::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0: return Disabled;
|
||||
case 1: return Enabled;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(0): return Disabled;
|
||||
case static_cast<std::uint8_t>(1): return Enabled;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum OFMOverrideReq [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const OFMOverrideReq::Value value)
|
||||
static const char *c_str(const OFMOverrideReq::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class OrdStatusTrd
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
PartiallyFilled = (std::uint8_t)1,
|
||||
Filled = (std::uint8_t)2,
|
||||
NULL_VALUE = (std::uint8_t)255
|
||||
PartiallyFilled = static_cast<std::uint8_t>(1),
|
||||
Filled = static_cast<std::uint8_t>(2),
|
||||
NULL_VALUE = static_cast<std::uint8_t>(255)
|
||||
};
|
||||
|
||||
static OrdStatusTrd::Value get(const std::uint8_t value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 1: return PartiallyFilled;
|
||||
case 2: return Filled;
|
||||
case 255: return NULL_VALUE;
|
||||
case static_cast<std::uint8_t>(1): return PartiallyFilled;
|
||||
case static_cast<std::uint8_t>(2): return Filled;
|
||||
case static_cast<std::uint8_t>(255): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum OrdStatusTrd [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const OrdStatusTrd::Value value)
|
||||
static const char *c_str(const OrdStatusTrd::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -99,24 +94,24 @@ class OrdStatusTrdCxl
|
||||
public:
|
||||
enum Value
|
||||
{
|
||||
TradeCorrection = (char)71,
|
||||
TradeCancel = (char)72,
|
||||
NULL_VALUE = (char)0
|
||||
TradeCorrection = static_cast<char>(71),
|
||||
TradeCancel = static_cast<char>(72),
|
||||
NULL_VALUE = static_cast<char>(0)
|
||||
};
|
||||
|
||||
static OrdStatusTrdCxl::Value get(const char value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 71: return TradeCorrection;
|
||||
case 72: return TradeCancel;
|
||||
case 0: return NULL_VALUE;
|
||||
case static_cast<char>(71): return TradeCorrection;
|
||||
case static_cast<char>(72): return TradeCancel;
|
||||
case static_cast<char>(0): return NULL_VALUE;
|
||||
}
|
||||
|
||||
throw std::runtime_error("unknown value for enum OrdStatusTrdCxl [E103]");
|
||||
}
|
||||
|
||||
static const char* c_str(const OrdStatusTrdCxl::Value value)
|
||||
static const char *c_str(const OrdStatusTrdCxl::Value value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
OrderCancelReject535() = default;
|
||||
|
||||
OrderCancelReject535(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)409;
|
||||
return static_cast<std::uint16_t>(409);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)535;
|
||||
return static_cast<std::uint16_t>(535);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "9";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
OrderCancelReject535 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = OrderCancelReject535(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
OrderCancelReject535 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
OrderCancelReject535 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -518,17 +519,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT
|
||||
@@ -582,7 +583,7 @@ public:
|
||||
throw std::runtime_error("length too large for getText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -595,7 +596,7 @@ public:
|
||||
SBE_NODISCARD std::string getTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -640,7 +641,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -652,14 +653,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReject535 &putText(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -669,14 +670,14 @@ public:
|
||||
#else
|
||||
OrderCancelReject535 &putText(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -724,17 +725,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -788,7 +789,7 @@ public:
|
||||
throw std::runtime_error("length too large for getExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -801,7 +802,7 @@ public:
|
||||
SBE_NODISCARD std::string getExecIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 40 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -846,7 +847,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 40 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -858,14 +859,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReject535 &putExecID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
{
|
||||
throw std::runtime_error("string too large for putExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 40; ++start)
|
||||
for (std::size_t start = srcLength; start < 40; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -875,14 +876,14 @@ public:
|
||||
#else
|
||||
OrderCancelReject535 &putExecID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
{
|
||||
throw std::runtime_error("string too large for putExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 40; ++start)
|
||||
for (std::size_t start = srcLength; start < 40; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -891,7 +892,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -930,17 +931,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -994,7 +995,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1007,7 +1008,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 308;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1052,7 +1053,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 308;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1064,14 +1065,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReject535 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 308 + start] = 0;
|
||||
}
|
||||
@@ -1081,14 +1082,14 @@ public:
|
||||
#else
|
||||
OrderCancelReject535 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 308 + start] = 0;
|
||||
}
|
||||
@@ -1097,7 +1098,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1136,17 +1137,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1200,7 +1201,7 @@ public:
|
||||
throw std::runtime_error("length too large for getClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1213,7 +1214,7 @@ public:
|
||||
SBE_NODISCARD std::string getClOrdIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 328;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1258,7 +1259,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 328;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1270,14 +1271,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReject535 &putClOrdID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 328 + start] = 0;
|
||||
}
|
||||
@@ -1287,14 +1288,14 @@ public:
|
||||
#else
|
||||
OrderCancelReject535 &putClOrdID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 328 + start] = 0;
|
||||
}
|
||||
@@ -1303,7 +1304,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1347,12 +1348,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1374,7 +1375,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1413,17 +1414,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1438,14 +1439,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *ordStatus() const
|
||||
{
|
||||
static const std::uint8_t ordStatusValues[] = { 85 };
|
||||
static const std::uint8_t ordStatusValues[] = { 85, 0 };
|
||||
|
||||
return (const char *)ordStatusValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char ordStatus(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t ordStatusValues[] = { 85 };
|
||||
static const std::uint8_t ordStatusValues[] = { 85, 0 };
|
||||
|
||||
return (char)ordStatusValues[index];
|
||||
}
|
||||
@@ -1455,7 +1456,7 @@ public:
|
||||
static std::uint8_t ordStatusValues[] = { 85 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues);
|
||||
|
||||
std::memcpy(dst, ordStatusValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, ordStatusValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1499,7 +1500,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1538,17 +1539,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1563,14 +1564,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *cxlRejResponseTo() const
|
||||
{
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 49 };
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 49, 0 };
|
||||
|
||||
return (const char *)cxlRejResponseToValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 49 };
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 49, 0 };
|
||||
|
||||
return (char)cxlRejResponseToValues[index];
|
||||
}
|
||||
@@ -1580,7 +1581,7 @@ public:
|
||||
static std::uint8_t cxlRejResponseToValues[] = { 49 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues);
|
||||
|
||||
std::memcpy(dst, cxlRejResponseToValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, cxlRejResponseToValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -1624,7 +1625,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1668,12 +1669,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1695,7 +1696,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1739,12 +1740,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1766,7 +1767,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1810,12 +1811,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1837,7 +1838,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1881,12 +1882,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1908,7 +1909,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1947,17 +1948,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2011,7 +2012,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -2024,7 +2025,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 388;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -2069,7 +2070,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 388;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -2081,14 +2082,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReject535 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 388, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 388 + start] = 0;
|
||||
}
|
||||
@@ -2098,14 +2099,14 @@ public:
|
||||
#else
|
||||
OrderCancelReject535 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 388, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 388 + start] = 0;
|
||||
}
|
||||
@@ -2114,7 +2115,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2158,12 +2159,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2185,7 +2186,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2224,17 +2225,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2256,7 +2257,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2298,7 +2299,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t));
|
||||
@@ -2312,7 +2320,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2354,7 +2362,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t possRetransFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t));
|
||||
@@ -2368,7 +2383,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2410,7 +2425,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t));
|
||||
@@ -2424,7 +2446,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2466,7 +2488,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t));
|
||||
@@ -2480,7 +2509,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2519,17 +2548,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2541,7 +2570,7 @@ public:
|
||||
{
|
||||
if (m_actingVersion < 4)
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
std::uint64_t val;
|
||||
@@ -2662,13 +2691,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
# define SBE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
# define SBE_CONSTEXPR_14 constexpr
|
||||
#else
|
||||
# define SBE_CONSTEXPR_14
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
# include <string_view>
|
||||
# define SBE_NODISCARD [[nodiscard]]
|
||||
@@ -48,6 +42,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
@@ -169,6 +164,11 @@ private:
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
enum MetaAttribute
|
||||
{
|
||||
EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
|
||||
@@ -186,6 +186,8 @@ public:
|
||||
std::uint64_t uint_value;
|
||||
};
|
||||
|
||||
using messageHeader = MessageHeader;
|
||||
|
||||
OrderCancelReplaceReject536() = default;
|
||||
|
||||
OrderCancelReplaceReject536(
|
||||
@@ -218,30 +220,30 @@ public:
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)409;
|
||||
return static_cast<std::uint16_t>(409);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
|
||||
{
|
||||
return MessageHeader::encodedLength() + sbeBlockLength();
|
||||
return messageHeader::encodedLength() + sbeBlockLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)536;
|
||||
return static_cast<std::uint16_t>(536);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)8;
|
||||
return static_cast<std::uint16_t>(8);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)5;
|
||||
return static_cast<std::uint16_t>(7);
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
|
||||
SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
|
||||
{
|
||||
return "9";
|
||||
}
|
||||
@@ -258,7 +260,7 @@ public:
|
||||
|
||||
OrderCancelReplaceReject536 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
|
||||
{
|
||||
MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
|
||||
|
||||
hdr
|
||||
.blockLength(sbeBlockLength())
|
||||
@@ -268,7 +270,7 @@ public:
|
||||
|
||||
return *this = OrderCancelReplaceReject536(
|
||||
buffer,
|
||||
offset + MessageHeader::encodedLength(),
|
||||
offset + messageHeader::encodedLength(),
|
||||
bufferLength,
|
||||
sbeBlockLength(),
|
||||
sbeSchemaVersion());
|
||||
@@ -311,18 +313,17 @@ public:
|
||||
|
||||
SBE_NODISCARD std::uint64_t decodeLength() const
|
||||
{
|
||||
OrderCancelReplaceReject536 skipper(m_buffer, m_offset,
|
||||
m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
OrderCancelReplaceReject536 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion);
|
||||
skipper.skip();
|
||||
return skipper.encodedLength();
|
||||
}
|
||||
|
||||
SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char * buffer() SBE_NOEXCEPT
|
||||
SBE_NODISCARD char *buffer() SBE_NOEXCEPT
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ public:
|
||||
return m_actingVersion;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -381,12 +382,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
return UINT32_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 4294967294;
|
||||
return UINT32_C(0xfffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -452,12 +453,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -479,7 +480,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -518,17 +519,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT
|
||||
@@ -582,7 +583,7 @@ public:
|
||||
throw std::runtime_error("length too large for getText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -595,7 +596,7 @@ public:
|
||||
SBE_NODISCARD std::string getTextAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -640,7 +641,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 12;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 256 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -652,14 +653,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReplaceReject536 &putText(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -669,14 +670,14 @@ public:
|
||||
#else
|
||||
OrderCancelReplaceReject536 &putText(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 256)
|
||||
{
|
||||
throw std::runtime_error("string too large for putText [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 256; ++start)
|
||||
for (std::size_t start = srcLength; start < 256; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 12 + start] = 0;
|
||||
}
|
||||
@@ -685,7 +686,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -724,17 +725,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -788,7 +789,7 @@ public:
|
||||
throw std::runtime_error("length too large for getExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -801,7 +802,7 @@ public:
|
||||
SBE_NODISCARD std::string getExecIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 40 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -846,7 +847,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 268;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 40 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -858,14 +859,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReplaceReject536 &putExecID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
{
|
||||
throw std::runtime_error("string too large for putExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 40; ++start)
|
||||
for (std::size_t start = srcLength; start < 40; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -875,14 +876,14 @@ public:
|
||||
#else
|
||||
OrderCancelReplaceReject536 &putExecID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 40)
|
||||
{
|
||||
throw std::runtime_error("string too large for putExecID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 40; ++start)
|
||||
for (std::size_t start = srcLength; start < 40; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 268 + start] = 0;
|
||||
}
|
||||
@@ -891,7 +892,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -930,17 +931,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -994,7 +995,7 @@ public:
|
||||
throw std::runtime_error("length too large for getSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1007,7 +1008,7 @@ public:
|
||||
SBE_NODISCARD std::string getSenderIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 308;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1052,7 +1053,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 308;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1064,14 +1065,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReplaceReject536 &putSenderID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 308 + start] = 0;
|
||||
}
|
||||
@@ -1081,14 +1082,14 @@ public:
|
||||
#else
|
||||
OrderCancelReplaceReject536 &putSenderID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putSenderID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 308 + start] = 0;
|
||||
}
|
||||
@@ -1097,7 +1098,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1136,17 +1137,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1200,7 +1201,7 @@ public:
|
||||
throw std::runtime_error("length too large for getClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1213,7 +1214,7 @@ public:
|
||||
SBE_NODISCARD std::string getClOrdIDAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 328;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1258,7 +1259,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 328;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 20 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1270,14 +1271,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReplaceReject536 &putClOrdID(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 328 + start] = 0;
|
||||
}
|
||||
@@ -1287,14 +1288,14 @@ public:
|
||||
#else
|
||||
OrderCancelReplaceReject536 &putClOrdID(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 20)
|
||||
{
|
||||
throw std::runtime_error("string too large for putClOrdID [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 20; ++start)
|
||||
for (std::size_t start = srcLength; start < 20; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 328 + start] = 0;
|
||||
}
|
||||
@@ -1303,7 +1304,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1347,12 +1348,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1374,7 +1375,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1418,12 +1419,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1445,7 +1446,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1489,12 +1490,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1516,7 +1517,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1560,12 +1561,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1587,7 +1588,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1631,12 +1632,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1658,7 +1659,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1697,17 +1698,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1761,7 +1762,7 @@ public:
|
||||
throw std::runtime_error("length too large for getLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast<size_t>(length));
|
||||
std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast<std::size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -1774,7 +1775,7 @@ public:
|
||||
SBE_NODISCARD std::string getLocationAsString() const
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 388;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string result(buffer, length);
|
||||
@@ -1819,7 +1820,7 @@ public:
|
||||
SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT
|
||||
{
|
||||
const char *buffer = m_buffer + m_offset + 388;
|
||||
size_t length = 0;
|
||||
std::size_t length = 0;
|
||||
|
||||
for (; length < 5 && *(buffer + length) != '\0'; ++length);
|
||||
std::string_view result(buffer, length);
|
||||
@@ -1831,14 +1832,14 @@ public:
|
||||
#if __cplusplus >= 201703L
|
||||
OrderCancelReplaceReject536 &putLocation(const std::string_view str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 388, str.data(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 388 + start] = 0;
|
||||
}
|
||||
@@ -1848,14 +1849,14 @@ public:
|
||||
#else
|
||||
OrderCancelReplaceReject536 &putLocation(const std::string& str)
|
||||
{
|
||||
const size_t srcLength = str.length();
|
||||
const std::size_t srcLength = str.length();
|
||||
if (srcLength > 5)
|
||||
{
|
||||
throw std::runtime_error("string too large for putLocation [E106]");
|
||||
}
|
||||
|
||||
std::memcpy(m_buffer + m_offset + 388, str.c_str(), srcLength);
|
||||
for (size_t start = srcLength; start < 5; ++start)
|
||||
for (std::size_t start = srcLength; start < 5; ++start)
|
||||
{
|
||||
m_buffer[m_offset + 388 + start] = 0;
|
||||
}
|
||||
@@ -1864,7 +1865,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1908,12 +1909,12 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT
|
||||
@@ -1935,7 +1936,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -1974,17 +1975,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65535;
|
||||
return static_cast<std::uint16_t>(65535);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)0;
|
||||
return static_cast<std::uint16_t>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (std::uint16_t)65534;
|
||||
return static_cast<std::uint16_t>(65534);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2006,7 +2007,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2045,17 +2046,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2070,14 +2071,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *ordStatus() const
|
||||
{
|
||||
static const std::uint8_t ordStatusValues[] = { 85 };
|
||||
static const std::uint8_t ordStatusValues[] = { 85, 0 };
|
||||
|
||||
return (const char *)ordStatusValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char ordStatus(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t ordStatusValues[] = { 85 };
|
||||
static const std::uint8_t ordStatusValues[] = { 85, 0 };
|
||||
|
||||
return (char)ordStatusValues[index];
|
||||
}
|
||||
@@ -2087,7 +2088,7 @@ public:
|
||||
static std::uint8_t ordStatusValues[] = { 85 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues);
|
||||
|
||||
std::memcpy(dst, ordStatusValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, ordStatusValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -2131,7 +2132,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2170,17 +2171,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)0;
|
||||
return static_cast<char>(0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)32;
|
||||
return static_cast<char>(32);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return (char)126;
|
||||
return static_cast<char>(126);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2195,14 +2196,14 @@ public:
|
||||
|
||||
SBE_NODISCARD const char *cxlRejResponseTo() const
|
||||
{
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 50 };
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 50, 0 };
|
||||
|
||||
return (const char *)cxlRejResponseToValues;
|
||||
}
|
||||
|
||||
SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const
|
||||
{
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 50 };
|
||||
static const std::uint8_t cxlRejResponseToValues[] = { 50, 0 };
|
||||
|
||||
return (char)cxlRejResponseToValues[index];
|
||||
}
|
||||
@@ -2212,7 +2213,7 @@ public:
|
||||
static std::uint8_t cxlRejResponseToValues[] = { 50 };
|
||||
std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues);
|
||||
|
||||
std::memcpy(dst, cxlRejResponseToValues, static_cast<size_t>(bytesToCopy));
|
||||
std::memcpy(dst, cxlRejResponseToValues, static_cast<std::size_t>(bytesToCopy));
|
||||
return bytesToCopy;
|
||||
}
|
||||
|
||||
@@ -2256,7 +2257,7 @@ public:
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2298,7 +2299,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t));
|
||||
@@ -2312,7 +2320,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2354,7 +2362,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t possRetransFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanFlag::Value possRetransFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t));
|
||||
@@ -2368,7 +2383,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2410,7 +2425,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD SplitMsg::Value splitMsg() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t));
|
||||
@@ -2424,7 +2446,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2466,7 +2488,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT
|
||||
SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t));
|
||||
return (val);
|
||||
}
|
||||
|
||||
SBE_NODISCARD BooleanNULL::Value liquidityFlag() const
|
||||
{
|
||||
std::uint8_t val;
|
||||
std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t));
|
||||
@@ -2480,7 +2509,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
SBE_NODISCARD static const char *DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
@@ -2519,17 +2548,17 @@ public:
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0x0L;
|
||||
return UINT64_C(0x0);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT
|
||||
{
|
||||
return 0xfffffffffffffffeL;
|
||||
return UINT64_C(0xfffffffffffffffe);
|
||||
}
|
||||
|
||||
static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT
|
||||
@@ -2541,7 +2570,7 @@ public:
|
||||
{
|
||||
if (m_actingVersion < 4)
|
||||
{
|
||||
return 0xffffffffffffffffL;
|
||||
return UINT64_C(0xffffffffffffffff);
|
||||
}
|
||||
|
||||
std::uint64_t val;
|
||||
@@ -2662,13 +2691,13 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
|
||||
return true;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
|
||||
SBE_NODISCARD static std::size_t computeLength()
|
||||
{
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
#endif
|
||||
size_t length = sbeBlockLength();
|
||||
std::size_t length = sbeBlockLength();
|
||||
|
||||
return length;
|
||||
#if defined(__GNUG__) && !defined(__clang__)
|
||||
|
||||
Loaded 100 of 149 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user