diff --git a/.vscode/launch.json b/.vscode/launch.json index 1a872dcdf..eeddcf1a5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,13 +8,15 @@ "program": "${workspaceRoot}/build/ninja_debug/server/sparkd", "args": [ "run", - // "test", - // "-a", - // "[ilink3]" + "test", + "-a", + "OutrightVanillaOrder" ], "stopAtEntry": false, "cwd": "${workspaceRoot}/build/ninja_debug/server/", - "environment": [], + "environment": [ + { "name": "TZ", "value": "America/Chicago" } + ], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ @@ -31,7 +33,9 @@ "request": "launch", "program": "/home/bts/spark/build/ninja_debug/server/sparkd", "args": [ - "run" + "test", + "-a", + "[ilink3]" ], "stopAtEntry": false, "cwd": "/home/bts/spark/build/ninja_debug/server/", diff --git a/CMakeLists.txt b/CMakeLists.txt index 17918540c..d5fea99b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ else () endif() set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3") + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef") add_subdirectory(src/server/sparkd) add_subdirectory(src/lib) diff --git a/doc/user/CMakeDeps.cmake b/doc/user/CMakeDeps.cmake index 59a6b66b9..c4ebbf5ad 100644 --- a/doc/user/CMakeDeps.cmake +++ b/doc/user/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) \ No newline at end of file +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) \ No newline at end of file diff --git a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesRowVM.cs b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesRowVM.cs index 800c14070..9a0ab6cef 100644 --- a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesRowVM.cs +++ b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesRowVM.cs @@ -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; diff --git a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesWindow.cs b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesWindow.cs index 4bed4f7c6..2a36a939c 100644 --- a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesWindow.cs +++ b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesWindow.cs @@ -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), diff --git a/src/client/spark/Modules/Trading/Fills/FillsVM.cs b/src/client/spark/Modules/Trading/Fills/FillsVM.cs index 6e52da2e5..555b41f79 100644 --- a/src/client/spark/Modules/Trading/Fills/FillsVM.cs +++ b/src/client/spark/Modules/Trading/Fills/FillsVM.cs @@ -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(); } diff --git a/src/client/spark/Modules/Trading/Fills/FillsWindow.cs b/src/client/spark/Modules/Trading/Fills/FillsWindow.cs index 8b1e6b35f..985d992da 100644 --- a/src/client/spark/Modules/Trading/Fills/FillsWindow.cs +++ b/src/client/spark/Modules/Trading/Fills/FillsWindow.cs @@ -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 { + 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( diff --git a/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs b/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs index ab128684f..14127c812 100644 --- a/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs +++ b/src/client/spark/Modules/Trading/OrderBook/OrderBookRowVM.cs @@ -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; diff --git a/src/client/spark/Modules/Trading/OrderBook/OrderBookWindow.cs b/src/client/spark/Modules/Trading/OrderBook/OrderBookWindow.cs index 8da78a4a6..607eb81e5 100644 --- a/src/client/spark/Modules/Trading/OrderBook/OrderBookWindow.cs +++ b/src/client/spark/Modules/Trading/OrderBook/OrderBookWindow.cs @@ -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)), diff --git a/src/client/spark/view/Extensions/Command/FileDialogCommand.cs b/src/client/spark/view/Extensions/Command/FileDialogCommand.cs index 7b0778f1a..7889416f9 100644 --- a/src/client/spark/view/Extensions/Command/FileDialogCommand.cs +++ b/src/client/spark/view/Extensions/Command/FileDialogCommand.cs @@ -64,6 +64,25 @@ namespace mbts.ui { } }, can_execute == null ? null : new Func(_ => can_execute())); + public static IDialogCommand export_csv( + Func get_file_content, + string source_window_name) => + new AnonymousFileDialogCommand(_ => + _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(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)) diff --git a/src/client/spark_api/utils/Log.cs b/src/client/spark_api/utils/Log.cs index 891548cf1..c2dbf489d 100644 --- a/src/client/spark_api/utils/Log.cs +++ b/src/client/spark_api/utils/Log.cs @@ -36,6 +36,7 @@ namespace bts { Plugin, Sdk, Http, + iLink3 // Please keep this list in sync with logging.h/logging.cpp } diff --git a/src/client/spark_core/utils/CsvHelper.cs b/src/client/spark_core/utils/CsvHelper.cs new file mode 100644 index 000000000..2b4fdfbe9 --- /dev/null +++ b/src/client/spark_core/utils/CsvHelper.cs @@ -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(this IEnumerable 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(); + 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; + } + + } +} diff --git a/src/data_files/CMakeDeps.cmake b/src/data_files/CMakeDeps.cmake index b4c513198..e99a3ee50 100644 --- a/src/data_files/CMakeDeps.cmake +++ b/src/data_files/CMakeDeps.cmake @@ -1 +1 @@ -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) \ No newline at end of file +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) \ No newline at end of file diff --git a/src/data_files/files/audit_ilink3.py b/src/data_files/files/audit_ilink3.py new file mode 100644 index 000000000..1ff9aa6fb --- /dev/null +++ b/src/data_files/files/audit_ilink3.py @@ -0,0 +1,405 @@ +import json +import csv +import datetime, time +import argparse, os + + +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)) + +def print_headers(): + # From https://www.cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+-+Minimum+Acceptable+Audit+Trail+Elements+-+Data+Definitions+and+Validation+Rules + line_to_write = "Sending Timestamps,Message Direction,Operator ID,Session ID,Manual Order Indicator,Message Type,Instrument,Order Flow ID,\ +CME Globex Order ID,Client Order ID,Order Request ID,Buy/Sell Indicator,Quantity,Limit Price,Stop Price,Order Type,Order Qualifier,IFM Flag,\ +Display Quantity,Minimum Quantity,Country of Origin,Fill Price,Fill Quantity,Cumulative Quantity,Remaining Quantity,Aggressor Flag,Source of Cancellation,\ +Reject Reason,CME Globex Message ID,Cross ID,Quote Request ID,Message Quote ID,Quote Set ID,Quote Entry ID,Bid Price,Bid Size,Offer Price,Offer Size,\ +Processed Entries,Party Details List Request ID,ListUpdateAction,Self-Matching Prevention ID,Self-Match Prevention Instr,Customer Type Indicator,\ +AvgPxGroupID,Average Px Ind,CmtaGiveUpCD,Origin,Clearing Trade Price Type,Customer Handling Instr,Executing Firm ID,Account Number,Take Up Firm,Take up Account" + + with open (args.output_file, 'w') as the_file: + the_file.write(line_to_write) + the_file.write("\n") + +def set_blanks(): + return "" + +def get_value(json_key): + prices = ["Price", "LastPx", "StopPx"] + if json_key in json_data: + if json_key in prices: + x = json_data[json_key] + return x['mantissa']/100000000000 + else: + return json_data[json_key] + else: + return "" + + +# Column 1 - Sending Timestamps +def SendingTimeEpoch(epochtime): #1 + #TIME = time.strftime('%Y%m%d-%H:%M:%S.{}'.format(epochtime/1000000000), time.gmtime(epochtime/1000000000)) + TIME = datetime.datetime.fromtimestamp(int(epochtime) / 1e9).strftime('%Y%m%d-%H:%M:%S.%f') + return TIME + +# Column 2 - Message Direction +def direction(whichway): + if whichway == '<': + DIRECTION = "FROM CME" + else: + DIRECTION = "TO CME" + return DIRECTION + +# Column 3 - Operator ID +def SenderID(sender): + if "SenderID" in json_data: + SENDER = json_data["SenderID"] + return SENDER + else: + return SESSIONID + + +# Column 4 - Session ID + +# Column 5 - Manual Order Indicator +def ManualOrderIndicator(manual): + if "ManualOrderIndicator" in json_data: + if manual == "Manual": + return "1" + else: + return "0" + +# Column 6 - Message Type +def MessageType(msg_type,orderstatus): + if msg_type == "NewOrderSingle514": + return "D" + elif msg_type == "ExecutionReportNew522": + return "8--0" + if "ExecutionReportTrade" in msg_type: + if orderstatus == "PartiallyFilled": + return "8--1" + else: + return "8--2" + elif msg_type == "ExecutionReportCancel534": + return "8--4" + elif msg_type == "ExecutionReportModify531": + return "8--5" + elif msg_type == "ExecutionReportCancel534": + return "8--H" + elif msg_type == "ExecutionReportReject523": + return "8--8" + elif msg_type == "OrderCancelReplaceReject536": + return "9--2" + elif msg_type == "OrderCancelReject535": + return "9--1" + elif msg_type == "PartyDetailsDefinitionRequest518": + return "CX" + elif msg_type == "PartyDetailsDefinitionRequestAck519": + return "CY" + elif msg_type == "OrderCancelRequest516": + return "F" + elif msg_type == "OrderCancelReplaceRequest515": + return "G" + + + +# Column 12 - Buy-Sell Indicator/Side +def Side(indicator): + if "Side" in json_data: + if indicator == "Buy": + return "1" + else: + return "2" + +# Column 16 - Order Type/OrdType +def OrdType(ordertype): + if "OrdType" in json_data: + if ordertype == "MarketWithProtection" or ordertype == "MarketwithProtection": + return "1" + elif ordertype == "Limit": + return "2" + elif ordertype == "StopWithProtection" or ordertype == "StopwithProtection": + return "3" + elif ordertype == "StopLimit": + return "4" + elif ordertype == "MarketLimit": + return "K" + else: + return "" + +# Column 17 - Order Qualifier/TimeInForce +def TimeInForce(orderqual): + if "TimeInForce" in json_data: + if orderqual == "Day": + return "0" + elif orderqual == "GTC": + return "1" + elif orderqual == "FAK": + return "3" + elif orderqual == "GTD": + return "6" + else: + return "" + +# Column 18 IFM Flag/OFMOverride +def OFMOverride(imfflag): + if "OFMOverride" in json_data: + if imfflag == "Enabled": + return "1" + else: + return "0" + +# Column 19 Display Quantity/DisplayQty +def DisplayQty(qty): + if "DisplayQty" in json_data: + if str(qty) == "0": + return "" + elif str(qty) == "4294967295": + return "" + else: + return qty + + +# Column 26 - Aggressor Flag/AggressorIndicator +def AggressorIndicator(aggressor): + if "AggressorIndicator" in json_data: + if aggressor == "True": + return "1" + else: + return "0" + +# Column 27 - Source of Cancellation/ExecRestatementReason +def ExecRestatementReason(sourcecancel): + if "ExecRestatementReason" in json_data: + if sourcecancel == "Exchange": + return "8" + elif sourcecancel == "CancelledNotBest": + return "9" + elif sourcecancel == "CancelOnDisconnect": + return "100" + elif sourcecancel == "CancelRestingDueToSelfMatchPrevention": + return "103" + elif sourcecancel == "CancelFromCMEGlobexCreditControlsViolation": + return "104" + elif sourcecancel == "CancelFromCMEOne": + return "105" + elif sourcecancel == "CancelFromRiskManagementAPI": + return "106" + elif sourcecancel == "CancelAggressingDueToSelfMatchPrevention": + return "107" + elif sourcecancel == "CancelDueToVolatilityQuoteOptionLessThanMinOrderSize": + return "108" + else: + return "" + +# Column 43 - Self-Match Prevention Instr/SelfMatchPreventionInstruction +def SelfMatchPreventionInstruction(instr): + if "SelfMatchPreventionInstruction" in json_data: + if instr == "CancelOldest": + return "O" + elif instr == "CancelNewest": + return "N" + else: + return "" + +# Column 44 - Customer Type Indicator/CustOrderCapacity +def CustOrderCapacity(custord): + if "CustOrderCapacity" in json_data: + if custord == "NULL_VALUE": + return "" + elif custord == "Membertradingfortheirownaccount": + return "1" + elif custord == "ClearingFirmtradingforitsproprietaryaccount": + return "2" + elif custord == "Membertradingforanothermember": + return "3" + else: + return "4" + +# Column 46 - Average Px Ind/AvgPxInd +def AvgPxInd(avgpxindicator): + if "AvgPxInd" in json_data: + if avgpxindicator == "NULL_VALUE": + return "" + else: + return avgpxindicator + +# Column 48 - Origin/ClearingAccountType +def ClearingAccountType(accounttype): + if "ClearingAccountType" in json_data: + if accounttype == "Customer": + return "0" + elif accounttype == "Firm": + return "1" + else: + return "" + +# Column 49 - Clearing Trade Price Type/ClearingTradePriceType +def ClearingTradePriceType(clrtrdprice): + if "ClearingTradePriceType" in json_data: + if clrtrdprice == "NULL_VALUE": + return "0" + else: + return "3" + +# Column 50 - Customer Handling Instr/CustOrderHandlingInst +def CustOrderHandlingInst(custorderinst): + if "CustOrderHandlingInst" in json_data: + if custorderinst == "ClientElectronic": + return "C" + elif custorderinst == "TEST": + return "D" + else: + return "" + +# Column 51 and 52 - Getting the Firm and Account Number +def partyid(partydetailid,column): + for x in partydetailid: + role = x['PartyDetailRole'] + id = x['PartyDetailID'] + if column == "51" and role == "ExecutingFirm": + return id + if column == "52" and role == "CustomerAccount": + return id + + +parser = argparse.ArgumentParser() +parser.add_argument("json_log", help="the json 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) +args = parser.parse_args() + +print_headers() + +list_types = ['NewOrderSingle514', 'OrderCancelReplaceRequest515', 'OrderCancelRequest516', 'PartyDetailsDefinitionRequest518', 'PartyDetailsDefinitionRequestAck519', \ + 'ExecutionReportNew522', 'ExecutionReportReject523', 'ExecutionReportTradeOutright525', 'ExecutionReportTradeSpread526', 'ExecutionReportTradeSpreadLeg527', \ + 'ExecutionReportModify531', 'ExecutionReportCancel534', 'OrderCancelReject535', 'OrderCancelReplaceReject536', ] + +# 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=16, minutes=30) +trade_day_utc_start = time.gmtime((time.mktime(trade_day_start.timetuple()))) +trade_day_end = input_as_datetime + datetime.timedelta(hours=16) +trade_day_utc_end = time.gmtime((time.mktime(trade_day_end.timetuple()))) + +file_opener = None +if args.json_log.endswith(".gz"): + import gzip + file_opener = gzip.open +else: + file_opener = open + + +#inputFile = open(fileInput) #open json file +#outputFile = open(fileOutput, 'w') #load csv file +# Get Session +with file_opener(args.json_log) as json_file: + for line in json_file: + data = json.loads(line) + json_data = data['msg_json'] + if "Session" in json_data: + SESSIONID = json_data["Session"] + +#inputFile = open(fileInput) #open json file +#outputFile = open(fileOutput, 'w') #load csv file +with file_opener(args.json_log) as json_file: + for line in json_file: + data = json.loads(line) + line_timestamp = time.strptime(data['time'], "%Y%m%d-%H:%M:%S.%f") + if trade_day_utc_start <= line_timestamp <= trade_day_utc_end: + json_data = data['msg_json'] + NAME = json_data["Name"] + if NAME in list_types: + EXECUTING_FIRM_ID = "" + ACCOUNT_NUMBER = "" + DIRECTION = direction(data['direction']) + # Set Blanks + blank_json = {'QuoteReqID': '', 'QuoteID': '', 'QuoteSetID': '', 'QuoteEntryID': '', 'BidPx': '', 'BidSize': '', 'OfferPx': '', \ + 'OfferSize': '', 'NoProcessedEntries': '', 'ListUpdateAction': '', 'MinQty': '', 'AvgPxGroupID': '', \ + 'CmtaGiveUpCD': '', 'TAKE_UP_FIRM': '', 'TAKE_UP_ACCOUNT': '',} + + # No Data Processing + straight_json = {'SecurityID': '', 'ClOrdID': '', 'OrderID': '', 'OrderRequestID': '', 'OrderQty': '', \ + 'Location': '', 'LastQty': '', 'CumQty': '', 'LeavesQty': '', 'Text': '', 'SideTradeID': '', 'CrossID': '', 'SelfMatchPreventionID': '', \ + 'Price': '', 'StopPx': '', 'LastPx': '', 'PartyDetailsListReqID': '', 'OrdStatus': ''} + + # Processing Data + process_json = {'SendingTimeEpoch': '', 'ManualOrderIndicator': '', 'SenderID': '', 'Side': '', 'OrdType': '', 'TimeInForce': '', \ + 'OFMOverride': '', 'AggressorIndicator': '', 'ExecRestatementReason': '', 'SelfMatchPreventionInstruction': '', 'CustOrderCapacity': '', \ + 'AvgPxInd': '', 'ClearingAccountType': '', 'ClearingTradePriceType': '', 'CustOrderHandlingInst': '', 'DisplayQty': ''} + + for d in straight_json: + test = get_value(d) + if test != "None" or test != "": + if "," in str(test): + test = test.replace(",",";") + if "4294967295" in str(test): + test = "" + if "us;" in str(test): + test = test.upper() + if d == "SelfMatchPreventionID" and len(str(test)) > 8: + test = "" + straight_json[d] = test + else: + straight_json[d] = '' + + for d in process_json: + if d in json_data: + function = locals()[d] + test = function(json_data[d]) + if test != "None": + process_json[d] = test + else: + process_json[d] = '' + elif d == "SenderID": + function = locals()[d] + test = function(SenderID) + if test != "None": + process_json[d] = test + + # Party Message Fields + # Column 51 - Executing Firm ID + if "NoPartyDetails" in json_data: + EXECUTING_FIRM_ID = partyid(json_data['NoPartyDetails'], "51") + # Column 52 - Party Account Number + ACCOUNT_NUMBER = partyid(json_data['NoPartyDetails'], "52") + + line_to_write = process_json['SendingTimeEpoch'] + "," + DIRECTION + "," + process_json['SenderID'] + "," + SESSIONID + "," + process_json['ManualOrderIndicator'] + "," + \ + MessageType(NAME,straight_json['OrdStatus']) + "," + str(straight_json['SecurityID']) + "," + str(straight_json['ClOrdID']) + "," + str(straight_json['OrderID']) + "," + str(straight_json['ClOrdID']) + "," + \ + str(straight_json['OrderRequestID']) + "," + process_json['Side'] + "," + str(straight_json['OrderQty']) + "," + str(straight_json['Price']) + "," + \ + str(straight_json['StopPx']) + "," + process_json['OrdType'] + "," + process_json['TimeInForce'] + "," + process_json['OFMOverride'] + "," + str(process_json['DisplayQty']) + "," + \ + blank_json['MinQty'] + "," + straight_json['Location'] + "," + str(straight_json['LastPx']) + "," + str(straight_json['LastQty']) + "," + str(straight_json['CumQty']) + "," + \ + str(straight_json['LeavesQty']) + "," + process_json['AggressorIndicator'] + "," + process_json['ExecRestatementReason'] + "," + str(straight_json['Text']) + "," + \ + str(straight_json['SideTradeID']) + "," + str(straight_json['CrossID']) + "," + blank_json['QuoteReqID'] + "," + blank_json['QuoteID'] + "," + blank_json['QuoteSetID'] + "," + \ + blank_json['QuoteEntryID'] + "," + blank_json['BidPx'] + "," + blank_json['BidSize'] + "," + blank_json['OfferPx'] + "," + blank_json['OfferSize'] + "," + \ + blank_json['NoProcessedEntries'] + "," + str(straight_json['PartyDetailsListReqID']) + "," + blank_json['ListUpdateAction'] + "," + str(straight_json['SelfMatchPreventionID']) + "," + \ + process_json['SelfMatchPreventionInstruction'] + "," + process_json['CustOrderCapacity'] + "," + blank_json['AvgPxGroupID'] + "," + process_json['AvgPxInd'] + "," + \ + blank_json['CmtaGiveUpCD'] + "," + str(process_json['ClearingAccountType']) + "," + process_json['ClearingTradePriceType'] + "," + process_json['CustOrderHandlingInst'] + "," + \ + EXECUTING_FIRM_ID + "," + str(ACCOUNT_NUMBER) + "," + blank_json['TAKE_UP_FIRM'] + "," + blank_json['TAKE_UP_ACCOUNT'] + + + #print(line_to_write) + + with open (args.output_file, 'a') as the_file: + the_file.write(line_to_write) + the_file.write("\n") + + + + + diff --git a/src/data_files/files/audit_upload.sh b/src/data_files/files/audit_upload.sh new file mode 100755 index 000000000..2aad9604d --- /dev/null +++ b/src/data_files/files/audit_upload.sh @@ -0,0 +1,73 @@ +#/bin/bash + +function help_and_exit() +{ + echo + echo Usage: $0 [option]... config_file + echo + echo Can also be used in cron like the following + echo 40 16 * * 1-5 /usr/bin/docker exec spark_10000 bash /sparkbin/data_files/audit_upload.sh /sparkdata/data/audit_uploads/example.conf + echo example.conf included. The location of the conf file should be relative to the docker container, not the host + echo + echo Options are as follows: + echo " -d|--date YYYYMMDD Example is 20180731" + echo " Help: " + echo " -h|--help Display this message." + echo + exit 1 +} + +DATE=$(date +%Y%m%d) +ORIG_DIR=$(pwd) +ERROR_LEVEL="0" + +while getopts "d:h" option; do + case $option in + d) DATE=$OPTARG ;; + h) help_and_exit;; + \?) echo "Invalid option: -$OPTARG" >&2; + exit 1;; + esac +done + +shift $((OPTIND-1)) + +CONFIG_FILE=$1 + +declare -A conf_vars; while read line; do conf_vars[${line%=*}]=${line#*=}; done <$CONFIG_FILE + +SESSION_ID=${conf_vars[session_id]} +FCM=${conf_vars[fcm]} +CLIENT=${conf_vars[client]} + +cd /sparkbin/data_files + +for SESSION in $(ls /sparkdata/data/ilink3/); do + if [[ $SESSION == *$SESSION_ID* ]]; then + echo "Session is $SESSION" + SESSION_DAY=$(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" + fi + echo $SESSION_DAY + if [[ ! -d /sparkdata/data/ilink3/$SESSION/audit_logs ]]; then + mkdir -p /sparkdata/data/ilink3/$SESSION/audit_logs + fi + if [[ -d /sparkdata/data/ilink3/$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 + fi + if [[ ! -d /sparkdata/data/md_audit ]]; then + mkdir /sparkdata/data/md_audit + fi + if [[ -d /sparkdata/data/md_audit ]]; then + # Running the MD Audit csv generation + cd /sparkbin + ./sparkd adminreport md > /sparkdata/data/md_audit/"$FCM"_md_"$CLIENT"_"$DATE".csv + 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" + fi +done diff --git a/src/data_files/files/audit_uploader.py b/src/data_files/files/audit_uploader.py new file mode 100755 index 000000000..51dcbc5ca --- /dev/null +++ b/src/data_files/files/audit_uploader.py @@ -0,0 +1,150 @@ +import getopt, sys, datetime +import paramiko, ftplib + +######################################################### +# Commandline Args # +######################################################### + +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 "-------------------------------------------------------" + +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) + usage() + sys.exit(2) + +for option, value in options: + if option in ("-h","--h","-help","--help"): + usage() + sys.exit() + elif option in ("-config_file","--config_file"): + config_file = value + elif option in ("-datestamp","--datestamp"): + datestamp = value + elif option in ("-fcm","--fcm"): + fcm = value + elif option in ("-client","--client"): + client = value + elif option in ("-session","--session"): + session = value + +for argument in arguments: + if argument in ("h", "help"): + usage() + sys.exit() + else: + print "Unrecognized commandline argument. Type help for usage." + sys.exit() + +if len(options) <= 0: + print "Requires a config file to run." + usage() + sys.exit() + + +######################################################### +# Read Config Function # +######################################################### + +def read_config_file(config_file, datestamp=datetime.datetime.today().strftime('%Y%m%d'), fcm=fcm, session=session): + ''' + Parse our config file that gets passed in as a commandline parameter. + All config keys must be of the form key=value. White space is ignored. + All config keys must be seperated by a newline character. + Called during initialization. + ''' + upload_config = {} + config_file = open(config_file, 'r') + config_file = config_file.read() + for config in config_file.split("\n"): + if '=' in config: + cleaned_key = config.split('=')[0].strip().upper() + cleaned_value = config.split('=')[1].strip() + if '*datestamp*' in cleaned_value: + cleaned_value = cleaned_value.replace('*datestamp*',datestamp) + if '*fcm*' in cleaned_value: + cleaned_value = cleaned_value.replace('*fcm*',fcm) + if '*client*' in cleaned_value: + cleaned_value = cleaned_value.replace('*client*',client) + if '*session*' in cleaned_value: + cleaned_value = cleaned_value.replace('*session*',session) + upload_config[cleaned_key] = cleaned_value + else: + pass + return upload_config + +######################################################### +# FTP File Transfer Function # +######################################################### +def putfile_ftp(file, put_path, site, user, password, port=21, verbose=True): + 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.' + +######################################################### +# SFTP File Transfer Function # +######################################################### +def putfile_sftp(file, put_path, site, username, password, port=22, verbose=True): + transport = paramiko.Transport((site, port)) + transport.connect(username = username, password = password) + sftp = paramiko.SFTPClient.from_transport(transport) + sftp.put(file, put_path) + sftp.close() + transport.close() + + +######################################################### +# Main # +######################################################### +#if datestamp != None: +# upload_config = read_config_file(config_file, datestamp) +#else: +# upload_config = read_config_file(config_file) + +try: + datestamp +except NameError: + upload_config = read_config_file(config_file) +else: + upload_config = read_config_file(config_file, datestamp) + + + +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"] ) + 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"]) ) + 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"]) ) + + diff --git a/src/data_files/files/cert_secure_logon.txt b/src/data_files/files/cert_secure_logon.txt index 4705d87e8..f73f7cf61 100644 --- a/src/data_files/files/cert_secure_logon.txt +++ b/src/data_files/files/cert_secure_logon.txt @@ -1,12 +1,19 @@ -Session ID Access ID Secret Key Creation Date Expiration Date Environment - -M4D lLtjH74y1Kh5XUJTLyH2 f1K_tROQp2lTIplVp34WxKa7xDUgfFnIteolfik061o 2019-09-03 2020-09-03 CERT - -MC1 VEMlkDuLz74OVHSuacQB IuHyYT3b-9KUo3WsuXykt-fXsjzp7L-JOrdCSQZLNl0 2019-09-03 2020-09-03 CERT - -MC5 77lzSUwPLlM9obaXh2mK z6aA9qfASDKfZkYTVKFqJd-78i0HZ2Q9ec3CKCYIqHg 2019-09-03 2020-09-03 CERT - -MC7 RphzI3rn71oGUEiYnX9e y6OvvPPyoyj2S8YAnE1gFduXT8v29HIMjO5EngYxSNg 2019-09-03 2020-09-03 CERT - -MC8 PYBIm2TI9gFPIxmHbuYl 6o-ZolGH2DdeQOlGtJ5Zqoh_kg7VdbxkmjeOHmigKwU 2019-09-03 2020-09-03 CERT - +Session ID Access ID Secret Key Creation Date Expiration Date Environment + +M4D lLtjH74y1Kh5XUJTLyH2 f1K_tROQp2lTIplVp34WxKa7xDUgfFnIteolfik061o 2019-09-03 2020-09-03 CERT + +MC1 VEMlkDuLz74OVHSuacQB IuHyYT3b-9KUo3WsuXykt-fXsjzp7L-JOrdCSQZLNl0 2019-09-03 2020-09-03 CERT + +MC5 77lzSUwPLlM9obaXh2mK z6aA9qfASDKfZkYTVKFqJd-78i0HZ2Q9ec3CKCYIqHg 2019-09-03 2020-09-03 CERT + +MC7 RphzI3rn71oGUEiYnX9e y6OvvPPyoyj2S8YAnE1gFduXT8v29HIMjO5EngYxSNg 2019-09-03 2020-09-03 CERT + +MC8 PYBIm2TI9gFPIxmHbuYl 6o-ZolGH2DdeQOlGtJ5Zqoh_kg7VdbxkmjeOHmigKwU 2019-09-03 2020-09-03 CERT + +NGG RYcigz3bSLIIBBF2A2Hq qB1dm9VkTKeXcdQpFzla8B3_jwTgya_-Fk5iyEJvr2E 2020-06-15 2021-06-15 NEWRELEASE + +NGF o4OTmmTLQ7Lv4g6bCm26 HbD3FneMyb9Fu-FkCDLscCczHqFcFE2PyWv978RXGyA 2019-12-20 2020-12-20 NEWRELEASE + +UZE EeFdZ1FPepk6U4k3xBZA 2LjEtdLvBLLB1QuDJ4KiJW6M4dF6IHWd_UKmo7p3_Us 2020-06-24 2021-06-24 NEWRELEASE + +VAE Y8iqatTewuoHX16gghw8 FNcCB3Ks1qleS56quYzH4V7zAu78YY2bCdLRi9tmU9E 2020-06-24 2021-06-24 NEWRELEASE diff --git a/src/data_files/files/example.conf b/src/data_files/files/example.conf new file mode 100644 index 000000000..12886ba6b --- /dev/null +++ b/src/data_files/files/example.conf @@ -0,0 +1,16 @@ +fcm=FCM +client=NAME +session_id=ses +put_host=ftpc.example.com +port_put=2222 +username_put=user +password_put=password +protocol_put=sftp +get_ilink3_file_path=/sparkdata/data/ilink3/*session*/audit_logs/ +put_ilink3_file_path=/ +get_ilink3_file_name=*fcm*_audit_*session*_*datestamp*.csv +put_ilink3_file_name=*fcm*_audit_*session*_*datestamp*.csv +get_md_file_path=/sparkdata/data/md_audit/ +put_md_file_path=/ +get_md_file_name=*fcm*_md_*client*_*datestamp*.csv +put_md_file_name=*fcm*_md_*client*_*datestamp*.csv diff --git a/src/lib/CMakeDeps.cmake b/src/lib/CMakeDeps.cmake index 31f275e77..96a14ebfc 100644 --- a/src/lib/CMakeDeps.cmake +++ b/src/lib/CMakeDeps.cmake @@ -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.cpp;metrics/metrics.cpp;metrics/system_metrics.cpp;orderman/actors/AsyncFactory.cpp;orderman/actors/FillStore.cpp;orderman/actors/GLBXExecutionGateway.cpp;orderman/actors/ICEExecutionGateway.cpp;orderman/actors/IExecutionGateway.cpp;orderman/actors/MDSupplementarySource.cpp;orderman/actors/OrderStore.cpp;orderman/actors/SODPosition.cpp;orderman/actors/SecuritySrc.cpp;orderman/actors/ServiceBridge.cpp;orderman/actors/order_manager/OrderBuilder.cpp;orderman/actors/order_manager/OrderManager.cpp;orderman/actors/order_manager/OrderServices.cpp;orderman/actors/order_manager/OrderServicesData.cpp;orderman/actors/order_manager/PositionIndex.cpp;orderman/core/IOrderServices.cpp;orderman/events/CancelRejectEvent.cpp;orderman/events/FilledPositionEvent.cpp;orderman/events/NewExecutionReportEvent.cpp;orderman/limiter/LimitStore.cpp;orderman/limiter/Limiter.cpp;orderman/limiter/ProductLimitNode.cpp;orderman/limiter/ProductLimitTree.cpp;orderman/limiter/SecurityLimitNode.cpp;orderman/limiter/SecurityLimitTree.cpp;orderman/limiter/tests/limit_tests.cpp;orderman/order_factory/DynamicOrderRegistry.cpp;orderman/order_factory/OrderFactory.cpp;orderman/order_router/OrderRouter.cpp;orderman/orderman_utils/BookUtils.cpp;orderman/orderman_utils/fix_order_codec.cpp;orderman/orderman_utils/orderman_utils.cpp;orderman/orders/CompositeOrder.cpp;orderman/orders/DynamicOrder.cpp;orderman/orders/GLBXNativeOrder.cpp;orderman/orders/ICENativeOrder.cpp;orderman/orders/Order.cpp;orderman/orders/TimeBoxOrder.cpp;orderman/orders/TriggerOrder.cpp;orderman/orders/algo/AlgoWrapperOrder.cpp;orderman/orders/algo/DynamicHelpers.cpp;orderman/orders/algo/IAlgoOrder.cpp;orderman/orders/algo/IAlgoServices.cpp;orderman/orders/algo/IBeforeLaunchAlgoServices.cpp;orderman/orders/algo/PositionUpdate.cpp;orderman/orders/algo/algo_orders/CoverAlgo.cpp;orderman/orders/algo/algo_orders/DeleteAndCoverAlgo.cpp;orderman/orders/algo/algo_orders/IcebergAlgo.cpp;orderman/orders/algo/algo_orders/JoinAlgo.cpp;orderman/orders/algo/algo_orders/LeanAlgo.cpp;orderman/orders/algo/algo_orders/OffsetAlgo.cpp;orderman/orders/algo/algo_orders/OnSignalAlgo.cpp;orderman/orders/algo/algo_orders/ProRataAlgo.cpp;orderman/orders/algo/algo_orders/ScratchAlgo.cpp;orderman/orders/algo/algo_orders/SplitterAlgo.cpp;orderman/orders/algo/algo_orders/TopAlgo.cpp;orderman/orders/algo/algo_orders/tests/AlgoTestDriver.cpp;orderman/orders/algo/algo_orders/tests/splitter_tests.cpp;orderman/orders/book_algos/BookAlgo.cpp;orderman/orders/book_algos/BookOrderBase.cpp;orderman/orders/book_algos/OCOOrder.cpp;orderman/orders/book_algos/PricerOrder.cpp;orderman/orders/queue_holder/QueueHolderOrder.cpp;orderman/orders/queue_holder/state_workers/QHOEndStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOStartStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWaitingForAckStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWaitingForCancelAllStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWorkingStateWorker.cpp;orderman/orders/spreader_orders/SpreaderOrder.cpp;orderman/orders/spreader_orders/spreader/LegFillState.cpp;orderman/orders/spreader_orders/spreader/LegPropertyData.cpp;orderman/orders/spreader_orders/spreader/NLegsHedgeRecompData.cpp;orderman/orders/spreader_orders/spreader/QuoteLegPriceQuantityState.cpp;orderman/orders/spreader_orders/spreader/SingleFillHedger.cpp;orderman/orders/spreader_orders/spreader/SingleLegQuoter.cpp;orderman/orders/spreader_orders/spreader/SpreaderBookkeepingData.cpp;orderman/orders/spreader_orders/spreader/SpreaderChildOrderState.cpp;orderman/orders/spreader_orders/spreader/SpreaderLegData.cpp;orderman/orders/spreader_orders/spreader/SpreaderUtils.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderOrderBuilder.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderOrderServices.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderPreActivationOrderServices.cpp;orderman/orders/spreader_orders/spreader/hedger/HedgerManager.cpp;orderman/orders/spreader_orders/spreader/hedger/UnhedgedDelta.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerEndStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerStartStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForCancelAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForFirstAckCancelledStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForFirstAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWorkingStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteDriverSet.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteDriverSetHistory.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteLegDriver.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterEndStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterStartStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForCancelAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForFirstAckCancelledWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForFirstAckWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForIOCWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForSizeStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWorkingStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderEndStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderStartStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWaitingForCancelAllStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWaitingForInitialDataStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWorkingStateWorker.cpp;orderman/orders/spreader_orders/tests/spreader_tests.cpp;orderman/server/OrderServiceServer.cpp;orderman/tests/fat_wrapper_tests.cpp;os/os.cpp;os/tests/os_tests.cpp;persistence/IStore.cpp;persistence/PersistenceServiceServer.cpp;persistence/SqliteStore.cpp;persistence/persistence_utils.cpp;persistence/tests/PersistenceServiceTests.cpp;plugin/SparkServices.cpp;plugin/plugin.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;tracing/PerfLog.cpp;tracing/bts_trace.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogon.cpp;utils/SharedMemory.cpp;utils/Sqlite_utils.cpp;utils/Uuid.cpp;utils/crypto/CipherType.cpp;utils/crypto/CryptoInit.cpp;utils/crypto/Digest.cpp;utils/crypto/KeyCodeHelper.cpp;utils/crypto/PasswordCallback.cpp;utils/crypto/PrivateKey.cpp;utils/crypto/PublicKey.cpp;utils/crypto/iostreambio.cpp;utils/datetime.cpp;utils/download.cpp;utils/file_utils.cpp;utils/init_spark_lib.cpp;utils/is_unittest_environment.cpp;utils/sftp.cpp;utils/stats.cpp;utils/tests/AuthTokenTests.cpp;utils/tests/IDGeneratorTests.cpp;utils/tests/SingleWriterConcurrentVectorTests.cpp;utils/thread_manager.cpp) \ No newline at end of file +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.cpp;metrics/metrics.cpp;metrics/system_metrics.cpp;orderman/actors/AsyncFactory.cpp;orderman/actors/FillStore.cpp;orderman/actors/GLBXExecutionGateway.cpp;orderman/actors/GLBXiLink3ExecutionGateway.cpp;orderman/actors/ICEExecutionGateway.cpp;orderman/actors/IExecutionGateway.cpp;orderman/actors/MDSupplementarySource.cpp;orderman/actors/OrderStore.cpp;orderman/actors/SODPosition.cpp;orderman/actors/SecuritySrc.cpp;orderman/actors/ServiceBridge.cpp;orderman/actors/ilink3/IL3ConnectionHandler.cpp;orderman/actors/ilink3/IL3GW.cpp;orderman/actors/ilink3/IL3Parser.cpp;orderman/actors/ilink3/IL3Reactor.cpp;orderman/actors/ilink3/ILink3Utils.cpp;orderman/actors/ilink3/SessionStore.cpp;orderman/actors/ilink3/test/ILinkGWTests.cpp;orderman/actors/order_manager/OrderBuilder.cpp;orderman/actors/order_manager/OrderManager.cpp;orderman/actors/order_manager/OrderServices.cpp;orderman/actors/order_manager/OrderServicesData.cpp;orderman/actors/order_manager/PositionIndex.cpp;orderman/core/IOrderServices.cpp;orderman/events/CancelRejectEvent.cpp;orderman/events/FilledPositionEvent.cpp;orderman/events/NewExecutionReportEvent.cpp;orderman/limiter/LimitStore.cpp;orderman/limiter/Limiter.cpp;orderman/limiter/ProductLimitNode.cpp;orderman/limiter/ProductLimitTree.cpp;orderman/limiter/SecurityLimitNode.cpp;orderman/limiter/SecurityLimitTree.cpp;orderman/limiter/tests/limit_tests.cpp;orderman/order_factory/DynamicOrderRegistry.cpp;orderman/order_factory/OrderFactory.cpp;orderman/order_router/OrderRouter.cpp;orderman/orderman_utils/BookUtils.cpp;orderman/orderman_utils/fix_order_codec.cpp;orderman/orderman_utils/orderman_utils.cpp;orderman/orders/CompositeOrder.cpp;orderman/orders/DynamicOrder.cpp;orderman/orders/GLBXNativeOrder.cpp;orderman/orders/ICENativeOrder.cpp;orderman/orders/Order.cpp;orderman/orders/TimeBoxOrder.cpp;orderman/orders/TriggerOrder.cpp;orderman/orders/algo/AlgoWrapperOrder.cpp;orderman/orders/algo/DynamicHelpers.cpp;orderman/orders/algo/IAlgoOrder.cpp;orderman/orders/algo/IAlgoServices.cpp;orderman/orders/algo/IBeforeLaunchAlgoServices.cpp;orderman/orders/algo/PositionUpdate.cpp;orderman/orders/algo/algo_orders/CoverAlgo.cpp;orderman/orders/algo/algo_orders/DeleteAndCoverAlgo.cpp;orderman/orders/algo/algo_orders/IcebergAlgo.cpp;orderman/orders/algo/algo_orders/JoinAlgo.cpp;orderman/orders/algo/algo_orders/LeanAlgo.cpp;orderman/orders/algo/algo_orders/OffsetAlgo.cpp;orderman/orders/algo/algo_orders/OnSignalAlgo.cpp;orderman/orders/algo/algo_orders/ProRataAlgo.cpp;orderman/orders/algo/algo_orders/ScratchAlgo.cpp;orderman/orders/algo/algo_orders/SplitterAlgo.cpp;orderman/orders/algo/algo_orders/TopAlgo.cpp;orderman/orders/algo/algo_orders/tests/AlgoTestDriver.cpp;orderman/orders/algo/algo_orders/tests/splitter_tests.cpp;orderman/orders/book_algos/BookAlgo.cpp;orderman/orders/book_algos/BookOrderBase.cpp;orderman/orders/book_algos/OCOOrder.cpp;orderman/orders/book_algos/PricerOrder.cpp;orderman/orders/glbx/IGLBXOrderEncoder.cpp;orderman/orders/glbx/iLink2OrderEncoder.cpp;orderman/orders/glbx/iLink3OrderEncoder.cpp;orderman/orders/queue_holder/QueueHolderOrder.cpp;orderman/orders/queue_holder/state_workers/QHOEndStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOStartStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWaitingForAckStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWaitingForCancelAllStateWorker.cpp;orderman/orders/queue_holder/state_workers/QHOWorkingStateWorker.cpp;orderman/orders/spreader_orders/SpreaderOrder.cpp;orderman/orders/spreader_orders/spreader/LegFillState.cpp;orderman/orders/spreader_orders/spreader/LegPropertyData.cpp;orderman/orders/spreader_orders/spreader/NLegsHedgeRecompData.cpp;orderman/orders/spreader_orders/spreader/QuoteLegPriceQuantityState.cpp;orderman/orders/spreader_orders/spreader/SingleFillHedger.cpp;orderman/orders/spreader_orders/spreader/SingleLegQuoter.cpp;orderman/orders/spreader_orders/spreader/SpreaderBookkeepingData.cpp;orderman/orders/spreader_orders/spreader/SpreaderChildOrderState.cpp;orderman/orders/spreader_orders/spreader/SpreaderLegData.cpp;orderman/orders/spreader_orders/spreader/SpreaderUtils.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderOrderBuilder.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderOrderServices.cpp;orderman/orders/spreader_orders/spreader/external_interfacing/SpreaderPreActivationOrderServices.cpp;orderman/orders/spreader_orders/spreader/hedger/HedgerManager.cpp;orderman/orders/spreader_orders/spreader/hedger/UnhedgedDelta.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerEndStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerStartStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForCancelAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForFirstAckCancelledStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWaitingForFirstAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/hedger/hedger_states/HedgerWorkingStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteDriverSet.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteDriverSetHistory.cpp;orderman/orders/spreader_orders/spreader/quoter/QuoteLegDriver.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterEndStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterStartStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForCancelAckStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForFirstAckCancelledWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForFirstAckWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForIOCWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWaitingForSizeStateWorker.cpp;orderman/orders/spreader_orders/spreader/quoter/quoter_states/QuoterWorkingStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderEndStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderStartStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWaitingForCancelAllStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWaitingForInitialDataStateWorker.cpp;orderman/orders/spreader_orders/spreader_states/SpreaderWorkingStateWorker.cpp;orderman/orders/spreader_orders/tests/spreader_tests.cpp;orderman/server/OrderServiceServer.cpp;orderman/tests/fat_wrapper_tests.cpp;os/os.cpp;os/tests/os_tests.cpp;persistence/IStore.cpp;persistence/PersistenceServiceServer.cpp;persistence/SqliteStore.cpp;persistence/persistence_utils.cpp;persistence/tests/PersistenceServiceTests.cpp;plugin/SparkServices.cpp;plugin/plugin.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;tracing/PerfLog.cpp;tracing/bts_trace.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogon.cpp;utils/SharedMemory.cpp;utils/Sqlite_utils.cpp;utils/Uuid.cpp;utils/crypto/CipherType.cpp;utils/crypto/CryptoInit.cpp;utils/crypto/Digest.cpp;utils/crypto/KeyCodeHelper.cpp;utils/crypto/PasswordCallback.cpp;utils/crypto/PrivateKey.cpp;utils/crypto/PublicKey.cpp;utils/crypto/iostreambio.cpp;utils/datetime.cpp;utils/download.cpp;utils/file_utils.cpp;utils/init_spark_lib.cpp;utils/is_unittest_environment.cpp;utils/sftp.cpp;utils/stats.cpp;utils/tests/AuthTokenTests.cpp;utils/tests/IDGeneratorTests.cpp;utils/tests/SingleWriterConcurrentVectorTests.cpp;utils/thread_manager.cpp) \ No newline at end of file diff --git a/src/lib/api/service_helpers/AdminServiceUtils.cpp b/src/lib/api/service_helpers/AdminServiceUtils.cpp index 7bfc34daf..16f33993b 100644 --- a/src/lib/api/service_helpers/AdminServiceUtils.cpp +++ b/src/lib/api/service_helpers/AdminServiceUtils.cpp @@ -596,7 +596,9 @@ bts::api::orderman::RoutingRecord AdminServiceUtils::get_routing_record(const bt rv.set_session(conn_ptr->name()); rv.set_operator_id(cme_user_data->operator_id()); rv.set_location(cme_user_data->location()); + rv.set_smp_id(cme_user_data->smp_id()); + if (cme_user_data->smp_instruction()== "O") rv.set_smp_instruction(api::orderman::SelfMatchPreventionInstruction::SELF_MATCH_PREVENTION_INSTRUCTION_CANCEL_RESTING); else if (cme_user_data->smp_instruction()== "N") diff --git a/src/lib/api/services/OrderService.proto b/src/lib/api/services/OrderService.proto index 40f126ee7..74f1eb990 100644 --- a/src/lib/api/services/OrderService.proto +++ b/src/lib/api/services/OrderService.proto @@ -386,7 +386,9 @@ message NativeOrderState { RoutingRecord routing_record = 5; NativeOrderType native_type = 6; string last_transact_time = 7; + uint64 last_transact_time_unix_ns = 9; double stop_px = 8; + uint64 exchange_order_id_u64 = 10; } // Custom order states @@ -455,7 +457,8 @@ enum TimeInForce { TIME_IN_FORCE_UNDEFINED = 0; TIME_IN_FORCE_DAY = 48; TIME_IN_FORCE_GTC = 49; - TIME_IN_FORCE_IOC = 51; + TIME_IN_FORCE_IOC = 51; // FAK + TIME_IN_FORCE_DATE = 52; } enum ManualOrderIndicator { diff --git a/src/lib/config/defaults/MarketData.conf b/src/lib/config/defaults/MarketData.conf index cf21b0f42..5ac10ae47 100644 --- a/src/lib/config/defaults/MarketData.conf +++ b/src/lib/config/defaults/MarketData.conf @@ -46,6 +46,12 @@ CMEOptions { } } +ICEPublisherOptions { + value { + network_interface: "eth1" + } +} + #to make this work in dev clone the operations repo #go here: c:\\code\\bts\\operations\\ice\\ICE_iMpactMulticastFeed_GettingStarted-1_1_36\\bin\\easyTunnel> #modify the easyTunnelProxy.properties file to replace diff --git a/src/lib/config/defaults/jetfix.conf b/src/lib/config/defaults/jetfix.conf index 7a807d553..57dab3067 100644 --- a/src/lib/config/defaults/jetfix.conf +++ b/src/lib/config/defaults/jetfix.conf @@ -14,7 +14,7 @@ JetFIXSimConnection { end_time: "02:00:00" start_time: "02:05:00" raw_data: "1JE9X" - use_cme_secure_logon: false + use_cme_secure_logon: false seconds_to_pause : 1 max_connection_attempts: 9999999 } @@ -31,9 +31,9 @@ JetFIXSimConnection { end_time: "02:00:00" start_time: "02:05:00" raw_data: "1JE9X" - use_cme_secure_logon: false + use_cme_secure_logon: false seconds_to_pause : 1 - } + } } } @@ -49,7 +49,7 @@ JetFIX { socket_connect_host_ip: "63.247.113.154" socket_connect_port: 80 sender_compid: "51251" - target_compid: "ICE" + target_compid: "ICE" start_time: "22:55:00" end_time: "22:05:00" sender_subid: "BTS" @@ -57,12 +57,12 @@ JetFIX { raw_data: "Starts123" max_order_msgs_per_window: 300 auto_fix_seq_num: true - + seconds_to_replay: 6000 } connection: @JetFIXSimConnection.sim #connection: @JetFIXSimConnection.sim_ice - + connection { name: "cme_mc5_99" platform: GLBX @@ -181,9 +181,9 @@ JetFIX { sender_subid: "BTS" raw_data: "S4PMA" auto_fix_seq_num: true - } + } } -} +} JetFIX { rule: "CannedCertSession.name='gt_cert'" @@ -196,7 +196,7 @@ JetFIX { socket_connect_host_ip: "63.247.113.154" socket_connect_port: 80 sender_compid: "51251" - target_compid: "ICE" + target_compid: "ICE" start_time: "22:55:00" end_time: "22:05:00" sender_subid: "BTS" @@ -204,7 +204,7 @@ JetFIX { raw_data: "Starts123" max_order_msgs_per_window: 300 auto_fix_seq_num: true - + seconds_to_replay: 6000 } connection: @JetFIXSimConnection.sim @@ -515,7 +515,7 @@ JetFIX { auto_fix_seq_num: true } } -} +} JetFIX { @@ -2391,9 +2391,1087 @@ JetFIX { } } } - + +# NrCert gateways +# 69.50.112.184,12,OESGW +# 69.50.112.202,50,CME Eurodollar Options +# 69.50.112.181,52,CME Globex FX Options II +# 69.50.112.191,54,CME Equity Options +# 69.50.112.174,56,NYMEX and COMEX Options +# 69.50.112.172,58,CBOT Treasury Options +# 69.50.112.195,60,CBOT Commodity and Equity Options +# 69.50.112.177,64,CME E-mini S&P 500 Futures +# 69.50.112.168,68,CME Equity Futures excluding E-mini S&P +# 69.50.112.183,70,CME Commodity Futures +# 69.50.112.189,72,CBOT Commodity Futures +# 69.50.112.197,74,KRX Futures; BMD Futures and Options +# 69.50.112.204,76,NYMEX and COMEX Metals and Alternative Market Futures +# 69.50.112.167,78,NYMEX Non-Crude Energy Futures +# 69.50.112.187,80,NYMEX Crude Energy Futures +# 69.50.112.179,82,CME Eurodollar Futures +# 69.50.112.198,84,CBOT Treasury Futures +# 69.50.112.169,88,CME Globex FX Futures and Options +# 69.50.112.199,99,AutoCert Segment + +macro { + name: "canned_004" + expression: "[CannedCertSession.name, '004']" +} + + +JetFIX { + rule: "CannedCertSession.name in ['NGG']" + value { + connection { + name: "cme_ngg_50" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64580 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.202" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "50" + cme_market_segment_id: 50 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_52" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64582 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.181" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "52" + cme_market_segment_id: 52 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_54" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64584 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.191" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "54" + cme_market_segment_id: 54 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_56" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64586 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.174" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "56" + cme_market_segment_id: 56 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_58" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64588 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.172" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "58" + cme_market_segment_id: 58 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_60" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64590 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.195" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "60" + cme_market_segment_id: 60 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # ES + connection { + name: "cme_ngg_64" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64594 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.177" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "64" + cme_market_segment_id: 64 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_68" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64598 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.168" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "68" + cme_market_segment_id: 68 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_70" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64600 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.183" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "70" + cme_market_segment_id: 70 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_72" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64602 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.189" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "72" + cme_market_segment_id: 72 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_74" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64604 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.197" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "74" + cme_market_segment_id: 74 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_76" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64606 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.204" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "76" + cme_market_segment_id: 76 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_78" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64608 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.167" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "78" + cme_market_segment_id: 78 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # CL + connection { + name: "cme_ngg_80" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64610 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.187" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "80" + cme_market_segment_id: 80 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_82" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64612 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.179" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "82" + cme_market_segment_id: 82 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_84" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64614 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.198" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "84" + cme_market_segment_id: 84 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_88" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64618 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.169" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "88" + cme_market_segment_id: 88 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_ngg_99" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 64629 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.199" + #socket_connect_port: 64530 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "99" + cme_market_segment_id: 99 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + } +} + +JetFIX { + rule: "CannedCertSession.name in ['VAE']" + value { + connection { + name: "cme_vae_50" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60221 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.202" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "50" + cme_market_segment_id: 50 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_52" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60223 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.181" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "52" + cme_market_segment_id: 52 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_54" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60225 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.191" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "54" + cme_market_segment_id: 54 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_56" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60227 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.174" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "56" + cme_market_segment_id: 56 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_58" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60229 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.172" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "58" + cme_market_segment_id: 58 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_60" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60231 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.195" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "60" + cme_market_segment_id: 60 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # ES + connection { + name: "cme_vae_64" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60235 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.177" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "64" + cme_market_segment_id: 64 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_68" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60239 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.168" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "68" + cme_market_segment_id: 68 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_70" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60241 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.183" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "70" + cme_market_segment_id: 70 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_72" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60243 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.189" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "72" + cme_market_segment_id: 72 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_74" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60245 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.197" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "74" + cme_market_segment_id: 74 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_76" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60247 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.204" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "76" + cme_market_segment_id: 76 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_78" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60249 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.167" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "78" + cme_market_segment_id: 78 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # CL + connection { + name: "cme_vae_80" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60251 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.187" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "80" + cme_market_segment_id: 80 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_82" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60253 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.179" + #socket_connect_port: 60253 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "82" + cme_market_segment_id: 82 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_84" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60255 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.198" + #socket_connect_port: 60255 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "84" + cme_market_segment_id: 84 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_88" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60259 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.169" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "88" + cme_market_segment_id: 88 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_vae_99" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60270 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.199" + #socket_connect_port: 60171 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "99" + cme_market_segment_id: 99 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + } +} + +JetFIX { + rule: "CannedCertSession.name in ['UZE']" + value { + connection { + name: "cme_uze_50" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60220 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.202" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "50" + cme_market_segment_id: 50 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_52" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60222 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.181" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "52" + cme_market_segment_id: 52 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_54" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60224 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.191" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "54" + cme_market_segment_id: 54 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_56" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60226 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.174" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "56" + cme_market_segment_id: 56 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_58" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60228 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.172" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "58" + cme_market_segment_id: 58 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_60" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60230 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.195" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "60" + cme_market_segment_id: 60 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # ES + connection { + name: "cme_uze_64" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60234 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.177" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "64" + cme_market_segment_id: 64 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_68" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60238 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.168" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "68" + cme_market_segment_id: 68 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_70" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60240 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.183" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "70" + cme_market_segment_id: 70 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_72" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60242 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.189" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "72" + cme_market_segment_id: 72 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_74" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60244 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.197" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "74" + cme_market_segment_id: 74 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_76" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60246 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.204" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "76" + cme_market_segment_id: 76 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_78" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60248 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.167" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "78" + cme_market_segment_id: 78 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + # CL + connection { + name: "cme_uze_80" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60250 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.187" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "80" + cme_market_segment_id: 80 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_82" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60252 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.179" + #socket_connect_port: 60253 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "82" + cme_market_segment_id: 82 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_84" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60254 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.198" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "84" + cme_market_segment_id: 84 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_88" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60258 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.169" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "88" + cme_market_segment_id: 88 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + connection { + name: "cme_uze_99" + platform: GLBX + socket_connect_host_ip: "10.3.10.16" + socket_connect_port: 60269 + #Original IP and Port + #socket_connect_host_ip: "69.50.112.199" + #socket_connect_port: 60170 + sender_compid: $canned_004 + target_compid: "CME" + target_subid: "99" + cme_market_segment_id: 99 + start_time: "00:30:00" + end_time: "23:30:00" + start_day: "sunday" + end_day: "friday" + sender_subid: "BTS" + use_ilink3: true + } + } +} + + #If no canned cert specified we fallback to just sim CannedCertSession { value { name: "" }} JetFIX {value {connection: @JetFIXSimConnection.sim}} - + diff --git a/src/lib/config/protos/jetfix.proto b/src/lib/config/protos/jetfix.proto index 6bc986d94..22426e072 100644 --- a/src/lib/config/protos/jetfix.proto +++ b/src/lib/config/protos/jetfix.proto @@ -9,9 +9,9 @@ message JetFIX { enum JetFIXPlatform { GLBX = 1; CBOE = 6; - SIM = 2; - ICE = 3; - SIMICE = 4; + SIM = 2; + ICE = 3; + SIMICE = 4; } optional JetFIXPlatform platform = 15 [default = GLBX]; @@ -87,6 +87,7 @@ message JetFIX { optional uint32 max_connection_attempts = 346 [default=10]; optional bool auto_fix_seq_num = 347 [default=false]; + optional bool use_ilink3 = 348 [default=false] ; } repeated Connection connection = 10; @@ -116,4 +117,4 @@ message CMECannedSecureLogon { "MC8 AbEEtBn63WIAuItPDz1c n3ndjYb03Hx6wBO3me35HoONyDgO5TZKWk0tDSaX9KA 2018-04-05 2019-04-05 CERT \n" "T39 UWggBgHWAe07aqW3ps2I tbb3it0rUQSSTa0TC9QcRwkrHEMDLWhaJH4VQ0FqGB4 2018-04-05 2019-04-05 NEWRELEASE \n" ]; -} \ No newline at end of file +} diff --git a/src/lib/jetfix/codec/FIXEncodingStream.h b/src/lib/jetfix/codec/FIXEncodingStream.h index 502c3786c..50642ea38 100644 --- a/src/lib/jetfix/codec/FIXEncodingStream.h +++ b/src/lib/jetfix/codec/FIXEncodingStream.h @@ -52,7 +52,7 @@ class FIXEncodingStream { auto msg_offset = _buffer.size(); _current_msg = FIXFragment(_buffer); - _begin_string_bm = _current_msg.add("FIX.4.2"); + _begin_string_bm = _current_msg.add(std::string_view {"FIX.4.2"}); _body_length_bm = _current_msg.add(0, 6); char mt_encoding[4]; diff --git a/src/lib/jetfix/codec/FieldDefinitions.h b/src/lib/jetfix/codec/FieldDefinitions.h index 5ba96346a..4fb4aad2e 100644 --- a/src/lib/jetfix/codec/FieldDefinitions.h +++ b/src/lib/jetfix/codec/FieldDefinitions.h @@ -85,6 +85,7 @@ typedef StringField<307> UnderlyingSecurityDesc; typedef StringField<336> TradingSessionID; typedef StringField<35> MsgType; typedef StringField<37> OrderID; +typedef BigIntField<37> OrderIDu64; typedef StringField<41> OrigClOrdID; typedef StringField<440> ClearingAccount; typedef StringField<48> SecurityID; diff --git a/src/lib/jetfix/codec/Fields.h b/src/lib/jetfix/codec/Fields.h index c35bec8b0..6bdb51d36 100644 --- a/src/lib/jetfix/codec/Fields.h +++ b/src/lib/jetfix/codec/Fields.h @@ -2,6 +2,8 @@ #include #include +#include + #include "lib/jetfix/codec/ReaderCursor.h" #include "lib/utils/meta_programming.h" #include "lib/utils/datetime.h" @@ -203,6 +205,13 @@ public: static std::pair write (char*buffer,std::string const &str) {return write (buffer,str.data (),str.size ());} + +#if __cplusplus >= 201703L + static uint32_t max_value_size (std::string_view const&str) {return str.size ();} + static std::pair write (char*buffer,std::string_view const &str) + {return write (buffer,str.data (),str.size ());} +#endif + static std::pair write (char*buffer,const char*str,uint32_t sz) { memcpy (buffer,str,sz); diff --git a/src/lib/jetfix/connection/SocketConnection.cpp b/src/lib/jetfix/connection/SocketConnection.cpp index 40f95c1de..b70a58991 100644 --- a/src/lib/jetfix/connection/SocketConnection.cpp +++ b/src/lib/jetfix/connection/SocketConnection.cpp @@ -23,9 +23,9 @@ SocketConnection::SocketConnection(bts::config::JetFIX::Connection const &cfg, : _fd(-1), _cfg(cfg), _log(cfg.log_fix_stream()), _in_log(), _out_log(), _perf_log(perf_log) { if (_log) { - _in_log.open(std::string("/tmp/fix_raw_read_log_") + session_name(cfg), + _in_log.open(std::string("/tmp/fix_raw_read_log_") + session_name(cfg).as_string, std::ios_base::app); - _out_log.open(std::string("/tmp/fix_raw_write_log_") + session_name(cfg), + _out_log.open(std::string("/tmp/fix_raw_write_log_") + session_name(cfg).as_string, std::ios_base::app); } } diff --git a/src/lib/jetfix/gateway/Session.cpp b/src/lib/jetfix/gateway/Session.cpp index c0c4a2461..8ca0d6804 100644 --- a/src/lib/jetfix/gateway/Session.cpp +++ b/src/lib/jetfix/gateway/Session.cpp @@ -788,7 +788,7 @@ OutFIXPtr make_logon(uint32_t seq_num, uint32_t last_seq_num_processed, { std::string sender_comp_id = session_cfg.sender_subid(); buffer.add(sender_comp_id); - buffer.add("1.0"); + buffer.add(std::string_view{"1.0"}); buffer.add(sender_comp_id); buffer.add(session_cfg.user_name()); @@ -797,19 +797,18 @@ OutFIXPtr make_logon(uint32_t seq_num, uint32_t last_seq_num_processed, buffer.add(0); buffer.add(1); buffer.add(1); - } - else - { - buffer.add(application); - buffer.add("1.0"); - buffer.add("BTS"); + } else { + buffer.add(std::string_view{application}); + buffer.add(std::string_view{"1.0"}); + buffer.add(std::string_view{"BTS"}); if (session_cfg.has_trading_session_id()) { buffer.add(1); buffer.add(session_cfg.trading_session_id()); } if (session_cfg.has_udf_support_indicator()) - buffer.add(session_cfg.udf_support_indicator()); + buffer.add( + session_cfg.udf_support_indicator()); if (session_cfg.use_cme_secure_logon()) { bts_assert(session_cfg.sender_compid().size() >= 3); @@ -820,25 +819,24 @@ OutFIXPtr make_logon(uint32_t seq_num, uint32_t last_seq_num_processed, std::string last_seq_num_str(9, ' '); i32_toa(last_seq_num_processed, &last_seq_num_str[0], 9); auto ld = glbx::calculate_hmac( - session_id, seq_num_str, session_cfg.sender_compid(), - session_cfg.sender_subid(), time_str, session_cfg.target_subid(), - std::to_string(session_cfg.seconds_between_hbs()), - session_cfg.sender_locationid(), last_seq_num_str, application, "1.0", - "BTS"); - #ifndef BTS_EDGE - LOG(Jetfix, Info, "Canonical string for secure logon: {}", ld.canonical); - #endif + session_id, seq_num_str, session_cfg.sender_compid(), + session_cfg.sender_subid(), time_str, session_cfg.target_subid(), + std::to_string(session_cfg.seconds_between_hbs()), + session_cfg.sender_locationid(), last_seq_num_str, application, + "1.0", "BTS"); +#ifndef BTS_EDGE + LOG(Jetfix, Info, "Canonical string for secure logon: {}", + ld.canonical); +#endif buffer.add(ld.access_key.size()); buffer.add(ld.access_key); - buffer.add("CME-1-SHA-256"); + buffer.add(std::string_view{"CME-1-SHA-256"}); buffer.add(ld.signature.size()); buffer.add(ld.signature); - } - else - { + } else { buffer.add(session_cfg.raw_data().size()); buffer.add(session_cfg.raw_data()); - if(session_cfg.user_name() != "") + if (session_cfg.user_name() != "") buffer.add(session_cfg.user_name()); } } diff --git a/src/lib/jetfix/store/FIXFileStore.cpp b/src/lib/jetfix/store/FIXFileStore.cpp index 07098c2e7..1085209c7 100644 --- a/src/lib/jetfix/store/FIXFileStore.cpp +++ b/src/lib/jetfix/store/FIXFileStore.cpp @@ -185,7 +185,7 @@ void load_seq_nums(std::string const &path, uint32_t *last_seq_num, FIXFileStore::FIXFileStore(config::JetFIX::Connection const &cfg, std::string base_path) : me(new PImpl(cfg)) { - auto sn = session_name(cfg); + auto sn = session_name(cfg).as_string; me->active = sn.size() > 0; if (me->active) { diff --git a/src/lib/jetfix/store/session_name.cpp b/src/lib/jetfix/store/session_name.cpp index 774dcc29f..c1a671959 100644 --- a/src/lib/jetfix/store/session_name.cpp +++ b/src/lib/jetfix/store/session_name.cpp @@ -75,49 +75,55 @@ bool in_session (datetime::PTime const &ref_date, return closest_earlier_end time_of_day_end && start_of_session.time_of_day () <= time_of_day_end) start_of_session -= boost::gregorian::date_duration (1); - - sprintf (&result[0], "%04d-%02d-%02d", + + using namespace boost::posix_time; + ptime epoch(boost::gregorian::date(1970,1,1)); + ptime session_start_date(start_of_session.date()); + result.as_uint64_t = (session_start_date - epoch).total_milliseconds(); + + sprintf (&(result.as_string[0]), "%04d-%02d-%02d", (unsigned short) start_of_session.date ().year (), start_of_session.date ().month ().as_number (), start_of_session.date ().day ().as_number ()); return result; } -std::string session_name (datetime::PTime const &ref_date, - boost::gregorian::greg_weekday weekday_start, - boost::posix_time::time_duration time_of_day_start, - boost::gregorian::greg_weekday weekday_end, - boost::posix_time::time_duration time_of_day_end) +SessionName session_name (datetime::PTime const &ref_date, + boost::gregorian::greg_weekday weekday_start, + boost::posix_time::time_duration time_of_day_start, + boost::gregorian::greg_weekday weekday_end, + boost::posix_time::time_duration time_of_day_end) { if (in_session (ref_date,weekday_start,time_of_day_start,weekday_end,time_of_day_end)) return session_name_from_ptime (closest_before (ref_date,weekday_start,time_of_day_start), boost::posix_time::time_duration(0, 0, 0), boost::posix_time::time_duration(0, 0, 1)); else - return std::string (); + return {}; } -std::string session_name (datetime::PTime const &ref_date, +SessionName session_name (datetime::PTime const &ref_date, boost::posix_time::time_duration time_of_day_start, boost::posix_time::time_duration time_of_day_end) { if (in_session (ref_date,time_of_day_start,time_of_day_end)) return session_name_from_ptime (ref_date, time_of_day_start, time_of_day_end); else - return ""; + return {}; } -std::string session_name (config::JetFIX::Connection const &session_cfg) +SessionName session_name (config::JetFIX::Connection const &session_cfg) { auto now = datetime::local_now (); @@ -134,7 +140,6 @@ std::string session_name (config::JetFIX::Connection const &session_cfg) parse_time (session_cfg.end_time ())); } - }} diff --git a/src/lib/jetfix/store/session_name.h b/src/lib/jetfix/store/session_name.h index 7b0c9a30a..08a5da45d 100644 --- a/src/lib/jetfix/store/session_name.h +++ b/src/lib/jetfix/store/session_name.h @@ -1,9 +1,9 @@ #pragma once +#include "lib/config/protos/jetfix.pb.h" +#include "lib/utils/datetime.h" #include #include -#include "lib/utils/datetime.h" -#include "lib/config/protos/jetfix.pb.h" namespace boost { namespace gregorian { @@ -11,39 +11,45 @@ class greg_weekday; } namespace posix_time { class time_duration; -}} - +} +} // namespace boost namespace bts { namespace jetfix { -boost::gregorian::greg_weekday parse_weekday (std::string weekday_str); -bool parse_time (std::string const &time_str,boost::posix_time::time_duration *out); +boost::gregorian::greg_weekday parse_weekday(std::string weekday_str); +bool parse_time(std::string const &time_str, + boost::posix_time::time_duration *out); -datetime::PTime closest_before (datetime::PTime const &ref_date, - boost::gregorian::greg_weekday weekday, - boost::posix_time::time_duration time_of_day); +datetime::PTime closest_before(datetime::PTime const &ref_date, + boost::gregorian::greg_weekday weekday, + boost::posix_time::time_duration time_of_day); -bool in_session (datetime::PTime const &ref_date, - boost::gregorian::greg_weekday weekday_start, - boost::posix_time::time_duration time_of_day_start, - boost::gregorian::greg_weekday weekday_end, - boost::posix_time::time_duration time_of_day_end); +bool in_session(datetime::PTime const &ref_date, + boost::gregorian::greg_weekday weekday_start, + boost::posix_time::time_duration time_of_day_start, + boost::gregorian::greg_weekday weekday_end, + boost::posix_time::time_duration time_of_day_end); -bool in_session (datetime::PTime const &ref_date, - boost::posix_time::time_duration time_of_day_start, - boost::posix_time::time_duration time_of_day_end); +bool in_session(datetime::PTime const &ref_date, + boost::posix_time::time_duration time_of_day_start, + boost::posix_time::time_duration time_of_day_end); -std::string session_name (datetime::PTime const &ref_date, - boost::gregorian::greg_weekday weekday_start, - boost::posix_time::time_duration time_of_day_start, - boost::gregorian::greg_weekday weekday_end, - boost::posix_time::time_duration time_of_day_end); +struct SessionName { + std::string as_string; + uint64_t as_uint64_t; + bool empty() const {return as_string.empty();}; +}; -std::string session_name (datetime::PTime const &ref_date, - boost::posix_time::time_duration time_of_day_start, - boost::posix_time::time_duration time_of_day_end); +SessionName session_name(datetime::PTime const &ref_date, + boost::gregorian::greg_weekday weekday_start, + boost::posix_time::time_duration time_of_day_start, + boost::gregorian::greg_weekday weekday_end, + boost::posix_time::time_duration time_of_day_end); +SessionName session_name(datetime::PTime const &ref_date, + boost::posix_time::time_duration time_of_day_start, + boost::posix_time::time_duration time_of_day_end); +SessionName session_name(config::JetFIX::Connection const &session_cfg); -std::string session_name (config::JetFIX::Connection const &session_cfg); - -}} +} // namespace jetfix +} // namespace bts diff --git a/src/lib/jetfix/tests/fix_fragment_tests.cpp b/src/lib/jetfix/tests/fix_fragment_tests.cpp index 2b7dc63e4..5757a55b6 100644 --- a/src/lib/jetfix/tests/fix_fragment_tests.cpp +++ b/src/lib/jetfix/tests/fix_fragment_tests.cpp @@ -81,9 +81,9 @@ TEST_CASE ("JetFIX Field2Tests", "[jetfix]") std::string out (20, ' '); typedef StringField<123> Field; - REQUIRE(Field::max_value_size ("hello")==5); + REQUIRE(Field::max_value_size (std::string_view{"hello"})==5); - auto result = Field::write (&out[0],"hello"); + auto result = Field::write (&out[0],std::string_view{"hello"}); REQUIRE (result.first==5); REQUIRE (result.second=='h'+'e'+'l'+'l'+'o'); REQUIRE (out.compare (0,5,"hello") == 0); @@ -112,7 +112,7 @@ TEST_CASE ("JetFIX FIXFragmentTests" , "[jetfix]") FIXFragment g (0); g.add> ('a'); g.add> (1.2,-1,6); - g.add> ("hello"); + g.add> (std::string_view{"hello"}); g.add> (123,3); const char*t_s = "20150427-19:05:18.922"; g.add> (datetime::parse_FIX_timestamp (t_s)); @@ -141,14 +141,14 @@ TEST_CASE ("JetFIX FIXFragmentTests" , "[jetfix]") FIXFragment g; auto c_bm = g.add> ('a'); auto f_bm = g.add> (1.2,-1,6); - auto s_bm = g.add> ("hello"); + auto s_bm = g.add> (std::string_view{"hello"}); auto i_bm = g.add> (123,3); auto t_bm = g.add> (datetime::parse_FIX_timestamp (t_s1)); auto b_bm = g.add> (true); g.overwrite (c_bm,'b'); g.overwrite (f_bm,1.3,-1,6); - g.overwrite (s_bm,"olleh"); + g.overwrite (s_bm,std::string_view {"olleh"}); g.overwrite (i_bm,321,3); g.overwrite (t_bm,(datetime::parse_FIX_timestamp (t_s2))); g.overwrite (b_bm,false); @@ -172,11 +172,11 @@ TEST_CASE ("JetFIX FIXFragmentTests" , "[jetfix]") FIXFragment g1;; g1.add> ('a'); g1.add> (1.2,-1,6); - g1.add> ("hello"); + g1.add> (std::string_view{"hello"}); auto chk1 = g1.checksum (); FIXFragment g2; - g2.add> ("goodbye"); + g2.add> (std::string_view{"goodbye"}); g2.add> (321,3); auto chk2 = g2.checksum (); diff --git a/src/lib/jetfix/tests/store_tests.cpp b/src/lib/jetfix/tests/store_tests.cpp index 4c3a74228..661a6d006 100644 --- a/src/lib/jetfix/tests/store_tests.cpp +++ b/src/lib/jetfix/tests/store_tests.cpp @@ -6,279 +6,270 @@ #include "lib/jetfix/common/OutFIXPtr.h" #include "lib/jetfix/store/FIXFileStore.h" #include "lib/jetfix/store/session_name.h" +#include "lib/logging/logging.h" #include "lib/utils/TempDir.h" #include "lib/utils/TimeStamp.h" #include "lib/utils/datetime.h" -#include "lib/logging/logging.h" +#include #include #include -#include namespace bts { namespace jetfix { -TEST_CASE ("JetFIX SessionNameTests", "[jetfix]") -{ - SECTION("greg_weekday_works") - { - const char*days [] = {"sun","Monday","tuesday","Wedn","Thursday","Friday","sat"}; +TEST_CASE("JetFIX SessionNameTests", "[jetfix]") { + SECTION("greg_weekday_works") { + const char *days[] = {"sun", "Monday", "tuesday", "Wedn", + "Thursday", "Friday", "sat"}; - int i =0; + int i = 0; for (auto d : days) - REQUIRE (parse_weekday (d)==boost::gregorian::greg_weekday (i++)); - } - - SECTION("closest_before_works") - { - auto same_day_before = closest_before (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Friday, - boost::posix_time::time_duration(16, 59, 59)); - REQUIRE (datetime::FIX_date_time_string (same_day_before)=="20150717-16:59:59"); - - auto same_day_after = closest_before (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Friday, - boost::posix_time::time_duration(17,0,1)); - REQUIRE (datetime::FIX_date_time_string (same_day_after)=="20150710-17:00:01"); - - auto another_day_same_week = closest_before (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Thursday, - boost::posix_time::time_duration(16, 59, 59)); - REQUIRE (datetime::FIX_date_time_string (another_day_same_week)=="20150716-16:59:59"); - - auto another_day_previous_week = closest_before (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Saturday, - boost::posix_time::time_duration(16, 59, 59)); - REQUIRE (datetime::FIX_date_time_string (another_day_previous_week)=="20150711-16:59:59"); - + REQUIRE(parse_weekday(d) == boost::gregorian::greg_weekday(i++)); } - SECTION("in_session_works") - { - REQUIRE (in_session (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Sunday, - boost::posix_time::time_duration(16, 59, 59), - - boost::gregorian::Friday, - boost::posix_time::time_duration(17, 0, 1))); + SECTION("closest_before_works") { + auto same_day_before = + closest_before(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Friday, + boost::posix_time::time_duration(16, 59, 59)); + REQUIRE(datetime::FIX_date_time_string(same_day_before) == + "20150717-16:59:59"); - REQUIRE (!in_session (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Sunday, - boost::posix_time::time_duration(16, 59, 59), - - boost::gregorian::Friday, - boost::posix_time::time_duration(16, 59, 59))); + auto same_day_after = closest_before( + datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Friday, boost::posix_time::time_duration(17, 0, 1)); + REQUIRE(datetime::FIX_date_time_string(same_day_after) == + "20150710-17:00:01"); - REQUIRE (in_session (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::posix_time::time_duration(16, 59, 59), - boost::posix_time::time_duration(17, 59, 59))); + auto another_day_same_week = + closest_before(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Thursday, + boost::posix_time::time_duration(16, 59, 59)); + REQUIRE(datetime::FIX_date_time_string(another_day_same_week) == + "20150716-16:59:59"); - REQUIRE (!in_session (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::posix_time::time_duration(0,0,0), - boost::posix_time::time_duration(16, 0,0))); - - REQUIRE (in_session (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::posix_time::time_duration(17, 50, 59), - boost::posix_time::time_duration(17, 45, 59))); - - REQUIRE (!in_session (datetime::make_ptime (2015,7,17,17,47,0,0), - boost::posix_time::time_duration(17, 50, 59), - boost::posix_time::time_duration(17, 45, 59))); + auto another_day_previous_week = + closest_before(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Saturday, + boost::posix_time::time_duration(16, 59, 59)); + REQUIRE(datetime::FIX_date_time_string(another_day_previous_week) == + "20150711-16:59:59"); } - SECTION("session_name_works") - { - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Sunday, - boost::posix_time::time_duration(16, 59, 59), - - boost::gregorian::Friday, - boost::posix_time::time_duration(17, 0, 1)) == - "2015-07-12"); + SECTION("in_session_works") { + REQUIRE(in_session(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Sunday, + boost::posix_time::time_duration(16, 59, 59), + boost::gregorian::Friday, + boost::posix_time::time_duration(17, 0, 1))); - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::gregorian::Sunday, - boost::posix_time::time_duration(16, 59, 59), - - boost::gregorian::Friday, - boost::posix_time::time_duration(16, 59, 59)) == ""); + REQUIRE(!in_session(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Sunday, + boost::posix_time::time_duration(16, 59, 59), - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::posix_time::time_duration(16, 59, 59), - boost::posix_time::time_duration(17, 59, 59)) == - "2015-07-17"); + boost::gregorian::Friday, + boost::posix_time::time_duration(16, 59, 59))); - REQUIRE (session_name (datetime::make_ptime (2015,7,17,18,0,0,0), - boost::posix_time::time_duration(16, 59, 59), - boost::posix_time::time_duration(17, 59, 59)) == - ""); + REQUIRE(in_session(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::posix_time::time_duration(16, 59, 59), + boost::posix_time::time_duration(17, 59, 59))); - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,0,0,0), - boost::posix_time::time_duration(17, 50, 59), - boost::posix_time::time_duration(17, 45, 59)) == - "2015-07-16"); + REQUIRE(!in_session(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::posix_time::time_duration(0, 0, 0), + boost::posix_time::time_duration(16, 0, 0))); - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,51,0,0), - boost::posix_time::time_duration(17, 50, 59), - boost::posix_time::time_duration(17, 45, 59)) == - "2015-07-17"); - - REQUIRE (session_name (datetime::make_ptime (2015,7,17,17,47,0,0), - boost::posix_time::time_duration(17, 50, 59), - boost::posix_time::time_duration(17, 45, 59)) == - ""); + REQUIRE(in_session(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::posix_time::time_duration(17, 50, 59), + boost::posix_time::time_duration(17, 45, 59))); + REQUIRE(!in_session(datetime::make_ptime(2015, 7, 17, 17, 47, 0, 0), + boost::posix_time::time_duration(17, 50, 59), + boost::posix_time::time_duration(17, 45, 59))); + } + + SECTION("session_name_works") { + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Sunday, + boost::posix_time::time_duration(16, 59, 59), + + boost::gregorian::Friday, + boost::posix_time::time_duration(17, 0, 1)).as_string == + "2015-07-12"); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::gregorian::Sunday, + boost::posix_time::time_duration(16, 59, 59), + + boost::gregorian::Friday, + boost::posix_time::time_duration(16, 59, 59)).as_string == ""); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::posix_time::time_duration(16, 59, 59), + boost::posix_time::time_duration(17, 59, 59)).as_string == + "2015-07-17"); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 18, 0, 0, 0), + boost::posix_time::time_duration(16, 59, 59), + boost::posix_time::time_duration(17, 59, 59)).as_string == ""); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 0, 0, 0), + boost::posix_time::time_duration(17, 50, 59), + boost::posix_time::time_duration(17, 45, 59)).as_string == + "2015-07-16"); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 51, 0, 0), + boost::posix_time::time_duration(17, 50, 59), + boost::posix_time::time_duration(17, 45, 59)).as_string == + "2015-07-17"); + + REQUIRE(session_name(datetime::make_ptime(2015, 7, 17, 17, 47, 0, 0), + boost::posix_time::time_duration(17, 50, 59), + boost::posix_time::time_duration(17, 45, 59)).as_string == ""); } - } - -TEST_CASE ("JetFIX FileStoreTests", "[jetfix]") -{ - SECTION("empty_store_works") - { +TEST_CASE("JetFIX FileStoreTests", "[jetfix]") { + SECTION("empty_store_works") { config::JetFIX::Connection c; - c.set_name ("test"); - c.set_sender_compid ("CME"); - c.set_sender_subid ("G"); - c.set_target_compid ("1U7001N"); - c.set_target_subid ("BLUESTREAM"); + c.set_name("test"); + c.set_sender_compid("CME"); + c.set_sender_subid("G"); + c.set_target_compid("1U7001N"); + c.set_target_subid("BLUESTREAM"); - c.set_start_time ("00:00:00"); - c.set_end_time ("23:59:59"); + c.set_start_time("00:00:00"); + c.set_end_time("23:59:59"); utils::TempDir td; - - FIXFileStore fs (c,td.name ()); - REQUIRE (fs.session_active ()); - REQUIRE (fs.replay ().size ()==0); - REQUIRE (fs.last_seq_num ()==0); - REQUIRE (fs.last_seq_num_processed ()==0); + + FIXFileStore fs(c, td.name()); + REQUIRE(fs.session_active()); + REQUIRE(fs.replay().size() == 0); + REQUIRE(fs.last_seq_num() == 0); + REQUIRE(fs.last_seq_num_processed() == 0); } - SECTION("in_msg_is_stored") - { - auto td = std::make_shared (); + SECTION("in_msg_is_stored") { + auto td = std::make_shared(); config::JetFIX::Connection c; - c.set_name ("test"); - c.set_sender_compid ("CME"); - c.set_sender_subid ("G"); - c.set_target_compid ("1U7001N"); - c.set_target_subid ("BLUESTREAM"); + c.set_name("test"); + c.set_sender_compid("CME"); + c.set_sender_subid("G"); + c.set_target_compid("1U7001N"); + c.set_target_subid("BLUESTREAM"); - c.set_start_time ("00:00:00"); - c.set_end_time ("23:59:59"); + c.set_start_time("00:00:00"); + c.set_end_time("23:59:59"); - FIXEncodingStream stream (c); - auto &buf = stream.new_msg (MessageTypes::Logon); - buf.add ("US,NC"); - buf.add (0); + FIXEncodingStream stream(c); + auto &buf = stream.new_msg(MessageTypes::Logon); + buf.add(std::string_view{"US,NC"}); + buf.add(0); buf.add(30); - buf.add ("O2"); - buf.add ("1.0"); - buf.add ("BTS"); - stream.close (); - stream.stamp (2,3,datetime::FIX_timestamp (datetime::now ())); - auto fix = stream.to_str (); - + buf.add(std::string_view{"O2"}); + buf.add(std::string_view{"1.0"}); + buf.add(std::string_view{"BTS"}); + stream.close(); + stream.stamp(2, 3, datetime::FIX_timestamp(datetime::now())); + auto fix = stream.to_str(); + { - FIXFileStore fs (c,td->name ()); - fs.store (InMsgBuffer (fix)); - fs.set_last_msg_processed (3); + FIXFileStore fs(c, td->name()); + fs.store(InMsgBuffer(fix)); + fs.set_last_msg_processed(3); } - FIXFileStore fs (c,td->name ()); - auto replay = fs.replay (); - REQUIRE (replay.size ()==1); - REQUIRE (replay[0].type ()==MessageTypes::Logon); - REQUIRE (replay[0].to_str ()==fix); - REQUIRE (fs.last_seq_num ()==0); - REQUIRE (fs.last_seq_num_processed ()==3); + FIXFileStore fs(c, td->name()); + auto replay = fs.replay(); + REQUIRE(replay.size() == 1); + REQUIRE(replay[0].type() == MessageTypes::Logon); + REQUIRE(replay[0].to_str() == fix); + REQUIRE(fs.last_seq_num() == 0); + REQUIRE(fs.last_seq_num_processed() == 3); } - SECTION("out_msg_is_stored") - { - auto td = std::make_shared (); + SECTION("out_msg_is_stored") { + auto td = std::make_shared(); config::JetFIX::Connection c; - c.set_name ("test"); - c.set_sender_compid ("CME"); - c.set_sender_subid ("G"); - c.set_target_compid ("1U7001N"); - c.set_target_subid ("BLUESTREAM"); + c.set_name("test"); + c.set_sender_compid("CME"); + c.set_sender_subid("G"); + c.set_target_compid("1U7001N"); + c.set_target_subid("BLUESTREAM"); - c.set_start_time ("00:00:00"); - c.set_end_time ("23:59:59"); + c.set_start_time("00:00:00"); + c.set_end_time("23:59:59"); auto msg_vec = std::make_shared(c); - auto &stream = msg_vec->fix.back (); - auto &buf = stream.new_msg (MessageTypes::Logon); - buf.add ("US,NC"); - buf.add (0); + auto &stream = msg_vec->fix.back(); + auto &buf = stream.new_msg(MessageTypes::Logon); + buf.add(std::string_view{"US,NC"}); + buf.add(0); buf.add(30); - buf.add ("O2"); - buf.add ("1.0"); - buf.add ("BTS"); - stream.close (); - stream.stamp (2,3,datetime::FIX_timestamp (datetime::now ())); - + buf.add(std::string_view{"O2"}); + buf.add(std::string_view{"1.0"}); + buf.add(std::string_view{"BTS"}); + stream.close(); + stream.stamp(2, 3, datetime::FIX_timestamp(datetime::now())); + { - FIXFileStore fs (c,td->name ()); - fs.store (msg_vec); + FIXFileStore fs(c, td->name()); + fs.store(msg_vec); } - FIXFileStore fs (c,td->name ()); - auto replay = fs.replay (); - REQUIRE (replay.size ()==0); - REQUIRE (fs.last_seq_num ()==3); - REQUIRE (fs.last_seq_num_processed ()==0); + FIXFileStore fs(c, td->name()); + auto replay = fs.replay(); + REQUIRE(replay.size() == 0); + REQUIRE(fs.last_seq_num() == 3); + REQUIRE(fs.last_seq_num_processed() == 0); } - SECTION("test_performance") - { - auto td = std::make_shared (); + SECTION("test_performance") { + auto td = std::make_shared(); config::JetFIX::Connection c; - c.set_name ("test"); - c.set_sender_compid ("CME"); - c.set_sender_subid ("G"); - c.set_target_compid ("1U7001N"); - c.set_target_subid ("BLUESTREAM"); + c.set_name("test"); + c.set_sender_compid("CME"); + c.set_sender_subid("G"); + c.set_target_compid("1U7001N"); + c.set_target_subid("BLUESTREAM"); - c.set_start_time ("00:00:00"); - c.set_end_time ("23:59:59"); + c.set_start_time("00:00:00"); + c.set_end_time("23:59:59"); - auto start = utils::TimeStamp::now (); + auto start = utils::TimeStamp::now(); { - FIXFileStore fs (c,td->name ()); - for (int i = 0; i < 10000;i++) { + FIXFileStore fs(c, td->name()); + for (int i = 0; i < 10000; i++) { auto msg_vec = std::make_shared>(); - msg_vec->emplace_back (c); - auto &stream = msg_vec->back (); - auto &buf = stream.new_msg (MessageTypes::Logon); - buf.add ("US,NC"); - buf.add (0); + msg_vec->emplace_back(c); + auto &stream = msg_vec->back(); + auto &buf = stream.new_msg(MessageTypes::Logon); + buf.add(std::string_view{"US,NC"}); + buf.add(0); buf.add(30); - buf.add ("O2"); - buf.add ("1.0"); - buf.add ("BTS"); - stream.close (); - stream.stamp (i,3,datetime::FIX_timestamp (datetime::now () - boost::gregorian::days (1))); - fs.store (InMsgBuffer (stream.to_str ())); + buf.add(std::string_view{"O2"}); + buf.add(std::string_view{"1.0"}); + buf.add(std::string_view{"BTS"}); + stream.close(); + stream.stamp(i, 3, + datetime::FIX_timestamp(datetime::now() - + boost::gregorian::days(1))); + fs.store(InMsgBuffer(stream.to_str())); } } - auto stop = utils::TimeStamp::now (); - LOG(Testing,Info,"jetfix store gen: {} ms", (stop-start).milliseconds () ); - - start = utils::TimeStamp::now (); - FIXFileStore fs (c,td->name ()); - stop = utils::TimeStamp::now (); - LOG(Testing,Info,"jetfix store load: {} ms", (stop-start).milliseconds () ); + auto stop = utils::TimeStamp::now(); + LOG(Testing, Info, "jetfix store gen: {} ms", + (stop - start).milliseconds()); + + start = utils::TimeStamp::now(); + FIXFileStore fs(c, td->name()); + stop = utils::TimeStamp::now(); + LOG(Testing, Info, "jetfix store load: {} ms", + (stop - start).milliseconds()); } - } -}} - - - - +} // namespace jetfix +} // namespace bts diff --git a/src/lib/logging/logging.cpp b/src/lib/logging/logging.cpp index e2cd92a96..c09598932 100644 --- a/src/lib/logging/logging.cpp +++ b/src/lib/logging/logging.cpp @@ -120,6 +120,7 @@ void configure_logging(bts::config::Logging const&cfg, bts::config::ThreadGroupC {log::Plugin,"Plugin"}, {log::Sdk,"Sdk"}, {log::Http,"Http"}, + {log::iLink3,"iLink3"}, }; real_cfg.sinks["console"] = diff --git a/src/lib/logging/logging.h b/src/lib/logging/logging.h index a2829d224..04ddc60ff 100644 --- a/src/lib/logging/logging.h +++ b/src/lib/logging/logging.h @@ -46,6 +46,7 @@ constexpr log::Subsystem DataFlow {Latency.ordinal+1 }; constexpr log::Subsystem Plugin {DataFlow.ordinal+1 }; constexpr log::Subsystem Sdk {Plugin.ordinal+1 }; constexpr log::Subsystem Http {Sdk.ordinal+1 }; +constexpr log::Subsystem iLink3 {Http.ordinal+1 }; struct LoggerHandle { LoggerHandle(LoggerHandle const&) = delete; diff --git a/src/lib/md/ExchangeSecurityKey.h b/src/lib/md/ExchangeSecurityKey.h new file mode 100644 index 000000000..7ff62dbd2 --- /dev/null +++ b/src/lib/md/ExchangeSecurityKey.h @@ -0,0 +1,5 @@ +#pragma once +#include "lib/utils/ValueWrapper.h" +namespace bts { +using ExchangeSecurityKey = utils::ValueWrapper; +} \ No newline at end of file diff --git a/src/lib/md/MBOServiceServer.cpp b/src/lib/md/MBOServiceServer.cpp index 16b8175fa..3ba697a18 100644 --- a/src/lib/md/MBOServiceServer.cpp +++ b/src/lib/md/MBOServiceServer.cpp @@ -1,71 +1,72 @@ #ifndef _WIN32 -#include "MBOServiceServer.h" +#include "MBOServiceServer.h" -#include "lib/api/services/OrderService.client.pb.h" -#include "lib/utils/Dispatcher.h" -#include "lib/utils/TimeStamp.h" -#include "lib/domain_model/Security.h" -#include "MDClient.h" #include "ExchangeOrderKey.h" #include "MBOProcessor.h" +#include "MDClient.h" +#include "lib/api/services/OrderService.client.pb.h" +#include "lib/domain_model/Security.h" +#include "lib/orderman/orderman_utils/orderman_common.h" +#include "lib/utils/Dispatcher.h" +#include "lib/utils/TimeStamp.h" #include "lib/utils/LockBox.h" #include -#include #include - +#include using namespace bts::api::orderman; -namespace bts { -namespace md { +namespace bts { +namespace md { // -// Simple class to handle MD recovery and maintain an index of SecurityKey=>MDConsumerHandle +// Simple class to handle MD recovery and maintain an index of +// SecurityKey=>MDConsumerHandle class HandleIndex { - MDClient& _client; + MDClient &_client; int _sub; std::optional _consumer; -public: - utils::LockBox> index; + public: + utils::LockBox> index; - HandleIndex(md::MDClient& client): - _client(client), - _sub(0), - _consumer(std::nullopt), - index() { - _sub = _client.on_consumer().subscribe([=](const MDConsumer& c) { on_consumer(c); }); - on_consumer(_client.current_consumer()); - } + HandleIndex(md::MDClient &client) + : _client(client), _sub(0), _consumer(std::nullopt), index() { + _sub = _client.on_consumer().subscribe( + [=](const MDConsumer &c) { on_consumer(c); }); + on_consumer(_client.current_consumer()); + } ~HandleIndex() { _client.on_consumer().unsubscribe(_sub); } - -private: - void on_consumer(const MDConsumer& c) { + private: + void on_consumer(const MDConsumer &c) { MDConsumer temp(c); if (temp.all_heartbeats_ok()) { auto existing = _consumer ? _consumer->id() : 0; - LOG(md,Info, "Updateing MBOService MDConsumer. Old {} new {}", existing, temp.id()); + LOG(md, Info, "Updateing MBOService MDConsumer. Old {} new {}", + existing, temp.id()); // clear the index - index.lock([](auto& index) { index.clear(); }); + index.lock([](auto &index) { index.clear(); }); // Swap to new consumer if (_consumer) { _consumer->swap(temp); + } else { + _consumer = temp; } - else { _consumer = temp; } // Subscribe to on_security auto id = _consumer->id(); - _consumer->on_security([this,id](const SecurityPtr&, MDConsumerHandle handle) { - if (_consumer->id() == id) { - index.lock([handle](auto& index) { - index[SecurityKey(handle.key())] = handle; - }); - } - }); + _consumer->on_security( + [this, id](const SecurityPtr &, MDConsumerHandle handle) { + if (_consumer->id() == id) { + index.lock([handle](auto &index) { + index[SecurityKey(handle.key())] = handle; + }); + } + }); } } }; @@ -73,21 +74,20 @@ private: class ActiveOrder { SecurityKey _security; SparkOrderKey _id; - ExchangeOrderKey _ex_id; + ExchangeOrderKey _ex_id; int32_t _position; -public: + public: // empty constructor needed for unordered map operator[] - // ActiveOrder(): _security(), _id(), _ex_id(), _position(-1) { bts_assert(false); } - ActiveOrder(SecurityKey sec, SparkOrderKey s, ExchangeOrderKey ex): _security(sec), _id(s), _ex_id(ex), _position(-1) {} - ActiveOrder(SecurityKey sec, SparkOrderKey s, const std::string& ex): _security(sec), _id(s), _ex_id(), _position(-1) { - _ex_id = ExchangeOrderKey(std::stoul(ex)); - } + // ActiveOrder(): _security(), _id(), _ex_id(), _position(-1) { + // bts_assert(false); } + ActiveOrder(SecurityKey sec, SparkOrderKey s, ExchangeOrderKey ex) + : _security(sec), _id(s), _ex_id(ex), _position(-1) {} SecurityKey security_id() const { return _security; } SparkOrderKey id() const { return _id; } ExchangeOrderKey exchange_id() const { return _ex_id; } - int32_t& position() { return _position; }; + int32_t &position() { return _position; }; int32_t position() const { return _position; }; bool set_position(int32_t pos) { if (pos != _position) { @@ -108,23 +108,14 @@ public: // MBOService struct MBOServiceImpl { - MBOServiceImpl( - api::ServiceContext& ctx, - utils::Dispatcher& d, - md::MDClient& c, - MBOServiceBase::PiqPublisher&& pub - ): - dispatcher(d), - client(c), - orders(ctx.locate()), - handle_index(c), - publish(pub), - timer(d, 200, [&]() {timer_tick();}), - orders_sub() - {} + MBOServiceImpl(api::ServiceContext &ctx, utils::Dispatcher &d, + md::MDClient &c, MBOServiceBase::PiqPublisher &&pub) + : dispatcher(d), client(c), + orders(ctx.locate()), handle_index(c), + publish(pub), timer(d, 200, [&]() { timer_tick(); }), orders_sub() {} - utils::Dispatcher& dispatcher; - md::MDClient& client; + utils::Dispatcher &dispatcher; + md::MDClient &client; OrderService orders; HandleIndex handle_index; @@ -138,23 +129,23 @@ struct MBOServiceImpl { void flush(); }; - - /////////////////////// -std::optional search_orders(const ExchangeOrderKey oid, const std::vector& orders) { +std::optional +search_orders(const ExchangeOrderKey oid, + const std::vector &orders) { IntPrice price = {}; size_t position = 0; for (size_t x = 0; x < orders.size(); ++x) { - const auto& oo = orders[x]; + const auto &oo = orders[x]; if (oo.id == oid) { - if (oo.price == price) return { position }; - else return 0; - } - else if (price == oo.price) { + if (oo.price == price) + return {position}; + else + return 0; + } else if (price == oo.price) { position += oo.size; - } - else { + } else { price = oo.price; position = oo.size; } @@ -162,11 +153,11 @@ std::optional search_orders(const ExchangeOrderKey oid, const std::vec return std::nullopt; } -bool update_position(const HandleIndex& handles, ActiveOrder& order) { - const auto& index = handles.index; - auto handle = index.lock([id=order.security_id()](const auto& index) { +bool update_position(const HandleIndex &handles, ActiveOrder &order) { + const auto &index = handles.index; + auto handle = index.lock([id = order.security_id()](const auto &index) { auto iter = index.find(id); - return iter != index.end() ? iter->second : MDConsumerHandle {}; + return iter != index.end() ? iter->second : MDConsumerHandle{}; }); if (handle.is_initialized()) { @@ -185,9 +176,9 @@ bool update_position(const HandleIndex& handles, ActiveOrder& order) { } void MBOServiceImpl::timer_tick() { - //Dispatcher thread + // Dispatcher thread std::vector rows; - for (auto& pair : active) { + for (auto &pair : active) { if (update_position(handle_index, pair.second)) { rows.push_back(pair.second.to_piq()); } @@ -197,29 +188,30 @@ void MBOServiceImpl::timer_tick() { } } -const NativeOrderState* native_order_state(const OrderRecord& record) { - switch(record.state().custom_case()) { - case OrderState::kMarket: - return &record.state().market().native_state(); - case OrderState::kLimit: - return &record.state().limit().native_state(); - case OrderState::kStop: - return &record.state().stop().native_state(); - case OrderState::kStopLimit: - return &record.state().stop_limit().native_state(); - case OrderState::kGlbxIceberg: - return &record.state().glbx_iceberg().native_state(); - default: +const NativeOrderState *native_order_state(const OrderRecord &record) { + switch (record.state().custom_case()) { + case OrderState::kMarket: + return &record.state().market().native_state(); + case OrderState::kLimit: + return &record.state().limit().native_state(); + case OrderState::kStop: + return &record.state().stop().native_state(); + case OrderState::kStopLimit: + return &record.state().stop_limit().native_state(); + case OrderState::kGlbxIceberg: + return &record.state().glbx_iceberg().native_state(); + default: return nullptr; } } -bool is_active_exchange_order(const OrderRecord& record) { +bool is_active_exchange_order(const OrderRecord &record) { return record.state().status() == ORDER_STATUS_WORKING && native_order_state(record) != nullptr; } -void try_remove(MBOServiceImpl& me, std::set& to_remove, const OrderRecord& record) { +void try_remove(MBOServiceImpl &me, std::set &to_remove, + const OrderRecord &record) { auto key = SparkOrderKey(record.key()); auto iter = me.active.find(key); if (iter != me.active.end()) { @@ -227,103 +219,113 @@ void try_remove(MBOServiceImpl& me, std::set& to_remove, const OrderRe to_remove.insert(key.value()); } } -void try_add(MBOServiceImpl& me, std::vector& to_add, const OrderRecord& record) { +void try_add(MBOServiceImpl &me, std::vector &to_add, + const OrderRecord &record) { if (is_active_exchange_order(record)) { auto native = native_order_state(record); + + auto ex_key = orderman::get_exchange_order_id(*native); + auto u64_key = + std::visit(overloaded{[](orderman::ExchangeOrderID const &str) { + return std::stoul(str.value().data()); + }, + [](orderman::ExchangeOrderID64 oid) { + return oid.value(); + }}, + ex_key); bts_assert(native); - ActiveOrder order( - SecurityKey(record.def().security_key()), - SparkOrderKey(record.key()), - native->exchange_order_id()); + ActiveOrder order(SecurityKey(record.def().security_key()), + SparkOrderKey(record.key()), ExchangeOrderKey{u64_key}); update_position(me.handle_index, order); to_add.push_back(order.to_piq()); me.active.insert(std::make_pair(order.id(), order)); } } -MBOServiceServer::MBOServiceServer( - api::ServiceContext& ctx, - utils::Dispatcher& d, - md::MDClient& c - ) : - MBOServiceBase(ctx), - _me(new MBOServiceImpl(ctx,d,c,make_piq_publisher())) - { - // subscribe to mdclient ✔ - // make publishers ✔ - // subscribe to orders => stash active orders dict - _me->orders_sub = - _me->orders.subscribe_orders().subscribe([=](const auto& update) { - // api thread - const auto& added = update.added(); - const auto& changed = update.changed(); - const auto& removed = update.removed(); - _me->dispatcher.post([this,added,changed,removed]() { - // dispatcher thread - std::vector to_add, to_change; - std::set to_remove; +MBOServiceServer::MBOServiceServer(api::ServiceContext &ctx, + utils::Dispatcher &d, md::MDClient &c) + : MBOServiceBase(ctx), + _me(new MBOServiceImpl(ctx, d, c, make_piq_publisher())) { + // subscribe to mdclient ✔ + // make publishers ✔ + // subscribe to orders => stash active orders dict + _me->orders_sub = + _me->orders.subscribe_orders().subscribe([=](const auto &update) { + // api thread + const auto &added = update.added(); + const auto &changed = update.changed(); + const auto &removed = update.removed(); + _me->dispatcher.post([this, added, changed, removed]() { + // dispatcher thread + std::vector to_add, to_change; + std::set to_remove; - // Remove - for(const auto& r : removed) { - // If it was active remove it and add to to_remove - try_remove(*_me, to_remove, *r); - } - // Added - for(const auto& add : added) { - // If active add look up the position and add to the state - try_add(*_me, to_add, *add); - } - // Changed - for(const auto& ch : changed) { - // new order is active and old is not look up piq and add to state - bool is_active = is_active_exchange_order(*ch.current()); - bool was_active = is_active_exchange_order(*ch.previous()); - if (is_active && !was_active) { - try_add(*_me, to_add, *ch.current()); - } - else if (was_active && !is_active) { - try_remove(*_me, to_remove, *ch.current()); - } - // is_active && was_active => don't care - // !is_active && !was_active => don't care - } + // Remove + for (const auto &r : removed) { + // If it was active remove it and add to to_remove + try_remove(*_me, to_remove, *r); + } + // Added + for (const auto &add : added) { + // If active add look up the position and add to the state + try_add(*_me, to_add, *add); + } + // Changed + for (const auto &ch : changed) { + // new order is active and old is not look up piq and add to + // state + bool is_active = is_active_exchange_order(*ch.current()); + bool was_active = is_active_exchange_order(*ch.previous()); + if (is_active && !was_active) { + try_add(*_me, to_add, *ch.current()); + } else if (was_active && !is_active) { + try_remove(*_me, to_remove, *ch.current()); + } + // is_active && was_active => don't care + // !is_active && !was_active => don't care + } - _me->publish(&to_add, &to_change, &to_remove); - if (!_me->timer.running()) _me->timer.start(); - }); - }); - } + _me->publish(&to_add, &to_change, &to_remove); + if (!_me->timer.running()) + _me->timer.start(); + }); + }); +} -MBOServiceServer::~MBOServiceServer() { } +MBOServiceServer::~MBOServiceServer() {} - -void MBOServiceServer::get_orders_for_security(const MBOSecurityQuery& request, const api::Response& reply) { +void MBOServiceServer::get_orders_for_security( + const MBOSecurityQuery &request, const api::Response &reply) { PositionData response; response.set_security_id(request.security_id()); - auto handle = _me->handle_index.index.lock([id=request.security_id()](const auto& index) { - auto iter = index.find(SecurityKey(id)); - return iter != index.end() ? iter->second : MDConsumerHandle {}; - }); + auto handle = _me->handle_index.index.lock( + [id = request.security_id()](const auto &index) { + auto iter = index.find(SecurityKey(id)); + return iter != index.end() ? iter->second : MDConsumerHandle{}; + }); std::unordered_map reverse; - for (const auto& pair : _me->active) { + for (const auto &pair : _me->active) { reverse.insert(std::make_pair(pair.second.exchange_id(), pair.first)); } size_t count = 0; auto tick = handle.get_minimum_tick(); - if(handle.is_initialized()) { + if (handle.is_initialized()) { auto mbo = handle.get_mbo(); if (mbo) { - for (const auto& o : mbo->bids) { + for (const auto &o : mbo->bids) { double price = o.price.price(); bool isnan = os::is_nan(request.price_level()); - if (isnan || securities::test_price_equality(request.price_level(), price, tick)) { + if (isnan || securities::test_price_equality(request.price_level(), + price, tick)) { ++count; - if (request.limit() && count > request.limit()) break; - auto* entry = response.add_bid(); + if (request.limit() && count > request.limit()) + break; + auto *entry = response.add_bid(); entry->set_exchange_id(o.id.value()); - if (isnan) entry->set_price(price); + if (isnan) + entry->set_price(price); entry->set_size(o.size); auto iter = reverse.find(o.id); if (iter != reverse.end()) { @@ -331,15 +333,18 @@ void MBOServiceServer::get_orders_for_security(const MBOSecurityQuery& request, } } } - for (const auto& o : mbo->asks) { + for (const auto &o : mbo->asks) { double price = o.price.price(); bool isnan = os::is_nan(request.price_level()); - if (isnan || securities::test_price_equality(request.price_level(), price, tick)) { + if (isnan || securities::test_price_equality(request.price_level(), + price, tick)) { ++count; - if (request.limit() && count > request.limit()) break; - auto* entry = response.add_ask(); + if (request.limit() && count > request.limit()) + break; + auto *entry = response.add_ask(); entry->set_exchange_id(o.id.value()); - if (isnan) entry->set_price(price); + if (isnan) + entry->set_price(price); entry->set_size(o.size); auto iter = reverse.find(o.id); if (iter != reverse.end()) { @@ -349,9 +354,10 @@ void MBOServiceServer::get_orders_for_security(const MBOSecurityQuery& request, } } } - + reply(response); } -}} //namespace +} // namespace md +} // namespace bts #endif diff --git a/src/lib/md/MDClient.cpp b/src/lib/md/MDClient.cpp index 3695640ba..7bae649bb 100644 --- a/src/lib/md/MDClient.cpp +++ b/src/lib/md/MDClient.cpp @@ -92,7 +92,7 @@ MDConsumer& MDClient::current_consumer() const { return _self->_consumer; } SecurityOracle MDClient::oracle() const { - return SecurityOracle(*this); + return SecurityOracle(_self->_cache); } std::set MDClient::symbols() const { return _self->_symbols; diff --git a/src/lib/md/MDConsumer.cpp b/src/lib/md/MDConsumer.cpp index 816b8b4e5..2744f021c 100644 --- a/src/lib/md/MDConsumer.cpp +++ b/src/lib/md/MDConsumer.cpp @@ -897,7 +897,7 @@ public: scan_securities(resolve_legs); } - SecurityPtr get_security(SecurityKey key) const { + const Security* get_security(SecurityKey key) const { return _cache.get_security(key); } @@ -979,7 +979,7 @@ size_t MDConsumer::walk_security_list(SecurityCallback cb, const string& symbol, size_t MDConsumer::scan_securities(bool resolve_legs) { return _pimpl->scan_securities(resolve_legs); } void MDConsumer::on_security(SecurityCallback cb, bool resolve_legs) { _pimpl->on_security(cb, resolve_legs); } -const api::Security* MDConsumer::get_security(SecurityKey key) const { return _pimpl->get_security(key).get(); } +const api::Security* MDConsumer::get_security(SecurityKey key) const { return _pimpl->get_security(key); } std::vector MDConsumer::get_securities() const {return _pimpl->get_securities();} MDConsumerChannel MDConsumer::get_channel(const std::string& symbol, SecurityType type, Venue exchange) const { diff --git a/src/lib/md/SecurityCache.cpp b/src/lib/md/SecurityCache.cpp index ee3eb7813..3bc196d2e 100644 --- a/src/lib/md/SecurityCache.cpp +++ b/src/lib/md/SecurityCache.cpp @@ -1,8 +1,10 @@ #include "SecurityCache.h" #include "SecurityDB.h" #include "lib/utils/Dispatcher.h" +#include "lib/utils/LockBox.h" #include +#include #include #include @@ -10,8 +12,8 @@ namespace bts { namespace md { struct SecurityCacheImpl { - std::mutex cache_mutex; - std::unordered_map cache; + utils::LockBox> cache; + utils::LockBox> ex_cache; tbb::concurrent_queue update_queue; void enqueue_update_db(const SecurityPtr&); void flush(); @@ -42,61 +44,83 @@ void SecurityCacheImpl::flush() { SecurityCache::SecurityCache() : _me(std::make_shared()) {} SecurityCache::~SecurityCache() {} -SecurityPtr SecurityCache::try_get_security(SecurityKey key) const { - std::lock_guard lock(_me->cache_mutex); - auto iter = _me->cache.find(key); - if (iter != _me->cache.end()) { - return iter->second; - } - return nullptr; +const Security* SecurityCache::try_get_security(SecurityKey key) const { + return _me->cache.lock([key](btree::btree_map& t) { + auto iter = t.find(key); + if (iter != t.end()) { + return iter->second.get(); + } + return (const api::Security*)nullptr; + }); +} +const Security* SecurityCache::try_get_security(ExchangeSecurityKey key) const { + return _me->ex_cache.lock([key](btree::btree_map& t) { + auto iter = t.find(key); + if (iter != t.end()) { + return iter->second.get(); + } + return (const api::Security*)nullptr; + }); } -SecurityPtr SecurityCache::get_security(SecurityKey key) { - std::unique_lock lock(_me->cache_mutex); - auto iter = _me->cache.find(key); - if (iter != _me->cache.end()) { - return iter->second; - } - else { - // unlock for db read - lock.unlock(); + +const Security* SecurityCache::get_security(SecurityKey key) { + const Security* result = try_get_security(key); + if (result == nullptr) { + // outside lock auto security = db::find_security(key); if (security) { LOG(md,Info, "Loaded security from database: {} {}", security->symbol(), security->id()); return add_db_security(security); } - return security; + return nullptr; } -} - -std::vector SecurityCache::get_securities() -{ - std::vector result; - result.reserve(100000); - - std::unique_lock lock(_me->cache_mutex); - for (auto const&p : _me->cache) - result.push_back(p.second.get()); return result; } -SecurityPtr SecurityCache::add_db_security(const SecurityPtr& security) { +std::vector SecurityCache::get_securities() { + std::vector result; + result.reserve(100000); + + _me->cache.lock([&result](auto& cache) { + for (auto const&p : cache) { + result.push_back(p.second.get()); + } + }); + return result; +} + +const Security* SecurityCache::add_db_security(const SecurityPtr& security) { bts_assert(security); - std::lock_guard lock(_me->cache_mutex); - SecurityKey key(security->id()); - auto result = _me->cache.insert(std::make_pair(SecurityKey(security->id()), security)); - // If result was inserted result.first->second is equal to security - // If the value was already present it must be a recently inserted 'live' security and we should use it - return result.first->second; + if (security->has_glbx()) { + _me->ex_cache.lock([&security](auto& cache) { + ExchangeSecurityKey key(security->id()); + cache.insert(std::make_pair(key, security)); + }); + } + return _me->cache.lock([&security](auto& cache) { + SecurityKey key(security->id()); + auto result = cache.insert(std::make_pair(key, security)); + // If result was inserted result.first->second is equal to security + // If the value was already present it must be a recently inserted 'live' security and we should use it + return result.first->second.get(); + }); } bool SecurityCache::add_live_security(const SecurityPtr& security) { bts_assert(security); - std::lock_guard lock(_me->cache_mutex); - SecurityKey key(security->id()); - // Insert but don't overwrite existing - auto result = _me->cache.insert(std::make_pair(SecurityKey(security->id()), security)); - _me->enqueue_update_db(security); - return result.second; + if (security->has_glbx()) { + _me->ex_cache.lock([&security](auto& cache) { + ExchangeSecurityKey key(security->id()); + cache.insert(std::make_pair(key, security)); + }); + } + return _me->cache.lock([&](auto& cache) { + SecurityKey key(security->id()); + // Insert but don't overwrite existing + auto result = cache.insert(std::make_pair(SecurityKey(security->id()), security)); + _me->enqueue_update_db(security); + return result.second; + }); } void SecurityCache::flush_to_disk() { _me->flush(); } diff --git a/src/lib/md/SecurityCache.h b/src/lib/md/SecurityCache.h index 49edfd482..520497c52 100644 --- a/src/lib/md/SecurityCache.h +++ b/src/lib/md/SecurityCache.h @@ -3,6 +3,7 @@ #include "lib/domain_model/Security.pb.h" #include "MDConsumerHandle.h" #include "lib/domain_model/SecurityKey.h" +#include "lib/md/ExchangeSecurityKey.h" #include "SecurityPtr.h" #include @@ -20,17 +21,18 @@ public: ~SecurityCache(); //Load security from cache with fallback to database - SecurityPtr get_security(SecurityKey key); + const Security* get_security(SecurityKey key); // Load all securities from cache, no fallback to database std::vector get_securities(); // Get the security if it's in the cache otherwise return nullptr. Does not query security database. - SecurityPtr try_get_security(SecurityKey key) const; + const Security* try_get_security(SecurityKey key) const; + const Security* try_get_security(ExchangeSecurityKey key) const; // returns true if the cache was updated bool add_live_security(const SecurityPtr& security); - SecurityPtr add_db_security(const SecurityPtr& security); + const Security* add_db_security(const SecurityPtr& security); void flush_to_disk(); diff --git a/src/lib/md/SecurityOracle.cpp b/src/lib/md/SecurityOracle.cpp index 369ea81bd..d8d372df3 100644 --- a/src/lib/md/SecurityOracle.cpp +++ b/src/lib/md/SecurityOracle.cpp @@ -4,14 +4,18 @@ namespace bts { namespace md { -SecurityOracle::SecurityOracle(const MDClient& client): _client(client) {} +SecurityOracle::SecurityOracle(SecurityCache& cache): _cache(cache) {} SecurityOracle::~SecurityOracle() { } const api::Security* SecurityOracle::get_security(SecurityKey key) const { - return _client.current_consumer().get_security(key); + return _cache.get_security(key); +} + +const api::Security* SecurityOracle::get_security(ExchangeSecurityKey key) const { + return _cache.try_get_security(key); } std::vector SecurityOracle::get_securities() const { - return _client.current_consumer().get_securities(); + return _cache.get_securities(); } }}//namespace diff --git a/src/lib/md/SecurityOracle.h b/src/lib/md/SecurityOracle.h index ab26f8abe..c69fe7d58 100644 --- a/src/lib/md/SecurityOracle.h +++ b/src/lib/md/SecurityOracle.h @@ -1,6 +1,8 @@ #pragma once #include "lib/domain_model/SecurityKey.h" +#include "lib/md/ExchangeSecurityKey.h" +#include "lib/md/SecurityCache.h" #include #include @@ -9,11 +11,12 @@ namespace api {class Security;} namespace md { class MDClient; class SecurityOracle { - const MDClient& _client; + SecurityCache& _cache; public: - SecurityOracle(const MDClient&); + SecurityOracle(SecurityCache&); ~SecurityOracle(); const api::Security* get_security(SecurityKey key) const; + const api::Security* get_security(ExchangeSecurityKey key) const; std::vector get_securities() const; }; diff --git a/src/lib/orderman/actors/FillStore.cpp b/src/lib/orderman/actors/FillStore.cpp index 7cbb5864a..78b963f18 100644 --- a/src/lib/orderman/actors/FillStore.cpp +++ b/src/lib/orderman/actors/FillStore.cpp @@ -10,6 +10,7 @@ #include "lib/persistence/SqliteStore.h" #include "lib/utils/PBUtils.h" #include "lib/orderman/actors/SODPosition.h" +#include "lib/utils/overloaded.h" #include #include @@ -164,8 +165,21 @@ void FillStore::on_execution_report( fill.set_fill_status(api::orderman::Fill::FILL_STATUS_CORRECTED); fill.set_fill_key(fk); - auto exchange_ts = utils::pb::to_timestamp( - datetime::parse_FIX_timestamp(to_str(er.transact_time))); + auto exchange_ts = + std::visit(overloaded { + [](const orderman::ExchangeTimeStampStr& ts) { + return utils::pb::to_timestamp( + datetime::parse_FIX_timestamp(to_str(ts))); + }, + [](ExchangeTimeStamp64 ts) { + google::protobuf::Timestamp gts; + auto seconds = ts.value() / 1E9; + gts.set_seconds(seconds); + gts.set_nanos(ts.value() - (seconds * 1E9)); + return gts; + } + }, er.transact_time); + *fill.mutable_timestamp() = exchange_ts; auto it = me->known_orders.find(er.order_key); diff --git a/src/lib/orderman/actors/GLBXExecutionGateway.cpp b/src/lib/orderman/actors/GLBXExecutionGateway.cpp index 8adc93eee..bd0086939 100644 --- a/src/lib/orderman/actors/GLBXExecutionGateway.cpp +++ b/src/lib/orderman/actors/GLBXExecutionGateway.cpp @@ -222,7 +222,9 @@ void GLBXExecutionGateway::on_exe_report( msg.get() ? api::orderman::MANUAL_ORDER_INDICATOR_YES : api::orderman::MANUAL_ORDER_INDICATOR_YES; - str_to(msg.get(), &data->exchange_order_id); + str_to(msg.get(), + & std::get( + data->exchange_order_id)); if (msg.has()) data->price = securities::decode_exchange_price( @@ -261,7 +263,9 @@ void GLBXExecutionGateway::on_exe_report( : Price(0); if (msg.has()) str_to(msg.get(), &data->exchange_fill_id); - str_to(msg.get(), &data->transact_time); + orderman::ExchangeTimeStampStr t; + str_to(msg.get(), &t); + data->transact_time = t; if (msg.has()) data->cust_order_handling_inst = msg.get(); @@ -280,12 +284,16 @@ void GLBXExecutionGateway::on_cancel_reject( decode_clorid(msg.get(), &ok, &sk); std::string reject_msg; + CancelRejectReason reason = CancelRejectReason::Other; if (msg.has()) reject_msg = msg.get(); - else if (msg.has()) + else if (msg.has()) { + if (msg.get() == 2045) + reason = CancelRejectReason::UnknownOrder; reject_msg = fmt::format("Order cancel was rejected with error code {}", msg.get()); - me->on_cancel_reject(ok, reject_msg); + } + me->on_cancel_reject({ok, reason,reject_msg}); } void GLBXExecutionGateway::on_connection_status_change(bool is_connected) { diff --git a/src/lib/orderman/actors/GLBXExecutionGateway.h b/src/lib/orderman/actors/GLBXExecutionGateway.h index 3c0edcc83..6aacf0d53 100644 --- a/src/lib/orderman/actors/GLBXExecutionGateway.h +++ b/src/lib/orderman/actors/GLBXExecutionGateway.h @@ -18,6 +18,7 @@ class GLBXExecutionGateway : public IExecutionGateway { void on_securities(const mercury::Update &) override; void on_admin_data(const mercury::Update &) override; void send_fix(jetfix::OutFIXPtr const &fix, trace::CorID trace) override; + void send_msgs(std::vector const&, trace::CorID) override {bts_assert(false);} OnExeReport& on_exe_report() override; OnGwStatusChange& on_gw_status_change() override; diff --git a/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.cpp b/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.cpp new file mode 100644 index 000000000..99696930c --- /dev/null +++ b/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.cpp @@ -0,0 +1,300 @@ +#include "lib/orderman/actors/GLBXiLink3ExecutionGateway.h" +#include "lib/config/config.h" +#include "lib/config/protos/orderman_cfg.pb.h" +#include "lib/domain_model/Security.h" +#include "lib/jetfix/common/OutFIX.h" +#include "lib/jetfix/store/session_name.h" +#include "lib/orderman/actors/GLBXExecutionGateway.h" +#include "lib/orderman/actors/ilink3/IL3GW.h" +#include "lib/orderman/actors/ilink3/IL3MessageFramer.h" +#include "lib/orderman/actors/ilink3/IL3Reactor.h" +#include "lib/orderman/actors/ilink3/IL3SecDB.h" +#include "lib/orderman/actors/ilink3/SessionStore.h" +#include "lib/orderman/events/NewSecuritiesEvent.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +enum class GLBXiLink3ExecutionGateway::State { + + WAITING_FOR_SECURITIES, + PAUSED, + CONNECTING, + READY +}; + +struct GLBXiLink3ExecutionGateway::PImpl { + PImpl(config::JetFIX::Connection const &cfg, trace::PerfLog &log, + md::SecurityOracle o) + : state(), cfg(cfg), reactor(), start_of_pause(), on_exe_report(), + on_gw_status_change(), on_cancel_reject(), perf_log(log), db(o), + gw_name(cfg.name()), session_store(), gw(), connection(nullptr), + connection_failures(0), started(false), replay_messages(), + has_replayed(false) { + TCPEndpoint endpoint{cfg.socket_connect_host_ip(), + (ushort)cfg.socket_connect_port()}; + connection = &reactor.register_connection({endpoint}); + } + + State state; + config::JetFIX::Connection const cfg; + IL3Reactor reactor; + IL3MessageFramer framer; + TimeStamp start_of_pause; + + OnExeReport on_exe_report; + OnGwStatusChange on_gw_status_change; + orderman::OnCancelReject on_cancel_reject; + trace::PerfLog &perf_log; + IL3SecDB db; + GatewayName gw_name; + std::optional session_store; + std::optional gw; + IL3Connection *connection; + size_t connection_failures; + bool started; + + // We need to keep this collection alive for the duration of the + // program because we will be passing pointers to ExecutionReport + // to other threads + std::vector replay_messages; + bool has_replayed; +}; + +GLBXiLink3ExecutionGateway::GLBXiLink3ExecutionGateway( + config::JetFIX::Connection const &cfg, trace::PerfLog &log, + md::SecurityOracle o) + : me(new PImpl(cfg, log, o)) { + me->state = State::WAITING_FOR_SECURITIES; +} + +GLBXiLink3ExecutionGateway::~GLBXiLink3ExecutionGateway() {} + +void GLBXiLink3ExecutionGateway::start() { + bts_assert(!me->started); + me->started = true; +} + +void GLBXiLink3ExecutionGateway::dispatch_incoming_fix_messages() { + if (me->started) { + switch (me->state) { + case State::WAITING_FOR_SECURITIES: + break; + case State::PAUSED: + on_time(); + break; + case State::READY: + case State::CONNECTING: + me->reactor.do_work(); + me->gw->on_time(); + break; + } + } +} + +void GLBXiLink3ExecutionGateway::on_time() { + bts_assert(me->state == State::PAUSED); + + // If we are still paused bail early, this avoids logging too much + // or spending too much CPU + if (pause_in_effect()) + return; + + me->start_of_pause = Timer::now(); + + // If we alread exceed the maximum number of failures per run + // bail. This is a safety measure to avoid overwhelming the + // exchange in the event of a bug or operational problem that + // results in repeated connection failures. + if (max_failures_reached()) { + LOG(iLink3, Warn, + "Maximum number of connection failures reached for {}. Reboot to try " + "again", + me->gw_name.value()); + return; + } + + // If we reach this point we are no longer in the pause window and + // we have not exceed our connection failure limit. The only thing + // to check now is wheter we are inside the exchange's active + // hours. + auto current_session = jetfix::session_name(me->cfg); + if (current_session.empty()) { + LOG(iLink3, Info, "Outside of session in ", me->gw_name.value()); + return; + } + // Yep, the stars are all aligned, lets try to connect + connect(current_session); +} + +void GLBXiLink3ExecutionGateway::connect(jetfix::SessionName const &sn) { + bts_assert(me->state == State::PAUSED); + transition(State::CONNECTING); + Config c; + c.cme_session = me->cfg.sender_compid().substr(0, 3); + c.firm = me->cfg.sender_compid().substr(3); + c.failover_on_disconnect = false; + + me->session_store.emplace(me->db, sn, &me->cfg); + if (!me->has_replayed) { + me->has_replayed = true; + me->replay_messages = me->session_store.value().replay(); + for (auto const &er : me->replay_messages) + me->on_exe_report(er, {}); + } + + c.raw_message_logger = + [store = &me->session_store.value()](auto d, auto sn, auto const &msg) { + store->async_store_raw_msg(d, sn, msg); + }; + + me->gw.emplace(*me->connection, me->framer, &me->db, + me->session_store->starting_session_descriptor(), c, + &me->cfg); + + me->gw->subscribe_cancel_reject([this](auto &cr) { + bts_assert(me->state == State::READY || me->state == State::CONNECTING); + me->on_cancel_reject(cr); + }); + + me->gw->subscribe_execution_reports([this](auto er) { + bts_assert(me->state == State::READY || me->state == State::CONNECTING); + me->on_exe_report(*er, {}); + }); + + me->gw->subscribe_session( + [this](auto const &s) { me->session_store->async_update_session(s); }); + + me->gw->subscribe_state([this](auto gw_state) { + LOG(iLink3, Info, "Internal gateway state change in {}. State is now {}", + me->gw_name.value(), + log::CharPtrWrapper{ilink3::state_string(gw_state)}); + switch (me->state) { + case State::CONNECTING: + if (gw_state == ilink3::State::READY) { + transition(State::READY); + me->on_gw_status_change(true); + } else if (gw_state == ilink3::State::ERROR) { + me->connection_failures++; + pause(); + } + break; + case State::READY: + if (gw_state == ilink3::State::ERROR) { + me->connection_failures++; + pause(); + me->on_gw_status_change(false); + } + break; + default: + bts_assert(false); + break; + } + }); + me->gw->connect(); +} + +void GLBXiLink3ExecutionGateway::pause() { + me->start_of_pause = Timer::now(); + me->gw.reset(); + transition(State::PAUSED); +} + +bool GLBXiLink3ExecutionGateway::pause_in_effect() const { + return sec_diff(Timer::now(), me->start_of_pause) <= + me->cfg.seconds_to_pause(); +} + +bool GLBXiLink3ExecutionGateway::max_failures_reached() const { + return me->connection_failures > me->cfg.max_connection_attempts(); +} + +void GLBXiLink3ExecutionGateway::on_securities( + const mercury::Update &update) { + if (update.events) { + + for (auto const &ev : *(update.events)) { + auto sec_ptr = ev.security; + me->db.add_security(*sec_ptr); + } + + if (me->state == State::WAITING_FOR_SECURITIES) { + LOG(iLink3, Warn, + "Received first set of {} securities. Proceeding " + "with initialization of execution gateway {}", + update.events->size(), me->gw_name.value()); + // got our security synopsis, ready to start the GW + transition(State::PAUSED); + } + } +} + +void GLBXiLink3ExecutionGateway::on_admin_data( + const mercury::Update &) {} + +void GLBXiLink3ExecutionGateway::send_msgs(std::vector const &msgs, + trace::CorID) { + + if (me->state == State::READY) { + for (auto &m : msgs) { + // NewOrderSingle + auto create_ptr = std::get_if(&m); + if (create_ptr) { + me->gw->send_order(*create_ptr); + continue; + } + // CancelReplace + auto cancel_replace_ptr = std::get_if(&m); + if (cancel_replace_ptr) { + me->gw->send_cancel_replace(*cancel_replace_ptr); + continue; + } + // Cancel + auto cancel_ptr = std::get_if(&m); + if (cancel_ptr) { + me->gw->send_cancel(*cancel_ptr); + continue; + } + } + me->gw->flush(); + } +} + +OnExeReport &GLBXiLink3ExecutionGateway::on_exe_report() { + return me->on_exe_report; +} + +OnGwStatusChange &GLBXiLink3ExecutionGateway::on_gw_status_change() { + return me->on_gw_status_change; +} + +orderman::OnCancelReject &GLBXiLink3ExecutionGateway::on_cancel_reject() { + return me->on_cancel_reject; +} + +log::CharPtrWrapper GLBXiLink3ExecutionGateway::state_name(State st) { + switch (st) { + case State::WAITING_FOR_SECURITIES: + return {"WAITING_FOR_SECURITIES"}; + case State::PAUSED: + return {"PAUSED"}; + case State::CONNECTING: + return {"CONNECTING"}; + case State::READY: + return {"READY"}; + } + bts_assert(false); + return {""}; +} + +void GLBXiLink3ExecutionGateway::transition(State new_state) { + LOG(iLink3, Info, "Transitioning {} from {} to {}", me->gw_name.value(), + state_name(me->state), state_name(new_state)); + me->state = new_state; +} + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.h b/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.h new file mode 100644 index 000000000..08cdfbc4c --- /dev/null +++ b/src/lib/orderman/actors/GLBXiLink3ExecutionGateway.h @@ -0,0 +1,48 @@ +#pragma once + +#include "IExecutionGateway.h" +#include "lib/logging/logging.h" + +namespace bts { +namespace jetfix {struct SessionName;} +namespace orderman { +namespace ilink3 { + +struct Session; + +class GLBXiLink3ExecutionGateway : public IExecutionGateway { + public: + GLBXiLink3ExecutionGateway(config::JetFIX::Connection const &, trace::PerfLog &, + md::SecurityOracle); + virtual ~GLBXiLink3ExecutionGateway(); + + void start() override; + void dispatch_incoming_fix_messages() override; + void on_securities(const mercury::Update &) override; + void on_admin_data(const mercury::Update &) override; + void send_fix(jetfix::OutFIXPtr const &, trace::CorID ) override {bts_assert(false);} + void send_msgs(std::vector const&, trace::CorID) override; + + OnExeReport& on_exe_report() override; + OnGwStatusChange& on_gw_status_change() override; + OnCancelReject &on_cancel_reject() override; + +private: + enum class State; + struct PImpl; + std::unique_ptr me; + + // Time passing + void on_time(); + bool pause_in_effect() const; + bool max_failures_reached()const; + static log::CharPtrWrapper state_name(State); + void transition(State); + + void pause(); + void connect(jetfix::SessionName const&); +}; + +} // namespace orderman +} // namespace bts +} diff --git a/src/lib/orderman/actors/ICEExecutionGateway.cpp b/src/lib/orderman/actors/ICEExecutionGateway.cpp index 333ae5f66..ce21dc29b 100644 --- a/src/lib/orderman/actors/ICEExecutionGateway.cpp +++ b/src/lib/orderman/actors/ICEExecutionGateway.cpp @@ -417,7 +417,9 @@ void ICEExecutionGateway::on_exe_report(const jetfix::fix::ICEExecutionReportMsg data->manual_order_indicator = api::orderman::MANUAL_ORDER_INDICATOR_NO; std::string oid_string = get_ice_order_id_string(msg); - str_to(oid_string, &data->exchange_order_id); + str_to(oid_string, + & std::get( + data->exchange_order_id)); data->ice_cl_ord_id = 0; if(msg.has()) data->ice_cl_ord_id = msg.get(); @@ -465,8 +467,10 @@ void ICEExecutionGateway::on_exe_report(const jetfix::fix::ICEExecutionReportMsg if (msg.has()) { std::string stamp = msg.get(); - stamp.resize(sizeof(mercury::TimeStampStr)); - str_to(stamp, &data->transact_time); + stamp.resize(sizeof(orderman::ExchangeTimeStampStr)); + orderman::ExchangeTimeStampStr t; + str_to(stamp, &t); + data->transact_time = t; } data->cfg = &me->cfg; data->msg = text_msg; @@ -486,7 +490,7 @@ void ICEExecutionGateway::on_cancel_reject(const jetfix::fix::ICECancelRejectMsg else if (msg.has()) reject_msg = fmt::format("Order cancel was rejected with error code {}", msg.get()); - me->on_cancel_reject(ok, reject_msg); + me->on_cancel_reject(CancelReject {ok, CancelRejectReason::Other,reject_msg}); } diff --git a/src/lib/orderman/actors/ICEExecutionGateway.h b/src/lib/orderman/actors/ICEExecutionGateway.h index c885a90af..bd249f535 100644 --- a/src/lib/orderman/actors/ICEExecutionGateway.h +++ b/src/lib/orderman/actors/ICEExecutionGateway.h @@ -17,6 +17,7 @@ class ICEExecutionGateway : public IExecutionGateway { void on_securities(const mercury::Update &) override; void on_admin_data(const mercury::Update &) override; void send_fix(const jetfix::OutFIXPtr& fix, trace::CorID trace) override; + void send_msgs(std::vector const&, trace::CorID) override {bts_assert(false);} OnExeReport& on_exe_report() override; OnGwStatusChange& on_gw_status_change() override; diff --git a/src/lib/orderman/actors/IExecutionGateway.cpp b/src/lib/orderman/actors/IExecutionGateway.cpp index ebe2a9e2b..fdfe457c3 100644 --- a/src/lib/orderman/actors/IExecutionGateway.cpp +++ b/src/lib/orderman/actors/IExecutionGateway.cpp @@ -1,17 +1,24 @@ #include "IExecutionGateway.h" -#include "ICEExecutionGateway.h" #include "GLBXExecutionGateway.h" +#include "ICEExecutionGateway.h" +#include "lib/utils/ValueWrapper.h" +#include "lib/orderman/actors/GLBXiLink3ExecutionGateway.h" + +#include namespace bts { namespace orderman { std::unique_ptr -ExecutionGatewayFactory::create_gateway(const config::JetFIX::Connection& conn, trace::PerfLog& pl, md::SecurityOracle o) -{ - if(conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_ICE || - conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_SIMICE) +ExecutionGatewayFactory::create_gateway(const config::JetFIX::Connection &conn, + trace::PerfLog &pl, + md::SecurityOracle o) { + if (conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_ICE || + conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_SIMICE) return std::make_unique(conn, pl, o); + else if (conn.use_ilink3()) + return std::make_unique(conn, pl, o); else return std::make_unique(conn, pl, o); } diff --git a/src/lib/orderman/actors/IExecutionGateway.h b/src/lib/orderman/actors/IExecutionGateway.h index 14eff752d..a6f99fee8 100644 --- a/src/lib/orderman/actors/IExecutionGateway.h +++ b/src/lib/orderman/actors/IExecutionGateway.h @@ -9,6 +9,7 @@ #include "lib/utils/bts_no_copy.h" #include +#include namespace bts { namespace trace {struct CorID;class PerfLog;} @@ -16,11 +17,42 @@ namespace orderman { class NewSecuritiesEvent; class NewAdminDataEvent; class ExecutionReport; +class CancelReject; +struct CreateOrderMsg { + OrderKey key; + Price price; + Quantity quantity; + api::Security const *security; + api::Side side; + Price stop_px; + Quantity display_quantity; + api::orderman::NativeOrderType order_type; + api::orderman::TimeInForce time_in_force; + api::orderman::ManualOrderIndicator manual_order_indicator; + api::orderman::RoutingRecord const *routing_record; +}; + +struct CancelReplaceOrderMsg { + CreateOrderMsg create_fields; + ExchangeOrderID64 exchange_order_id; +}; + +struct CancelOrderMsg { + OrderKey key; + ExchangeOrderID64 exchange_order_id; + api::orderman::ManualOrderIndicator manual_order_indicator; + api::Security const *security; + api::orderman::RoutingRecord const *routing_record; + api::Side side; +}; + +using OrderMsg = + std::variant; using OnGwStatusChange = std::function; using OnExeReport = std::function; -using OnCancelReject = std::function; +using OnCancelReject = std::function; // fix execution gateway for a single FIX session class IExecutionGateway { @@ -33,7 +65,7 @@ class IExecutionGateway { virtual void on_securities(const mercury::Update &) = 0; virtual void on_admin_data(const mercury::Update &) = 0; virtual void send_fix(const jetfix::OutFIXPtr&, trace::CorID) = 0; - + virtual void send_msgs(std::vector const&, trace::CorID) = 0; virtual OnExeReport& on_exe_report() = 0; virtual OnGwStatusChange& on_gw_status_change() = 0; virtual OnCancelReject &on_cancel_reject() = 0; diff --git a/src/lib/orderman/actors/MDSource.h b/src/lib/orderman/actors/MDSource.h index 529a8155d..8655bdcf7 100644 --- a/src/lib/orderman/actors/MDSource.h +++ b/src/lib/orderman/actors/MDSource.h @@ -1,5 +1,6 @@ #pragma once +#include "lib/domain_model/Security.h" #include "lib/logging/logging.h" #include "lib/md/IntPrice.h" #include "lib/md/MDConsumer.h" @@ -10,12 +11,11 @@ #include "lib/mercury/events/TimerEvent.h" #include "lib/orderman/events/BookUpdateEvent.h" #include "lib/orderman/events/MDRequestEvent.h" -#include "lib/orderman/events/TickerUpdateEvent.h" #include "lib/orderman/events/StatusUpdateEvent.h" +#include "lib/orderman/events/TickerUpdateEvent.h" #include "lib/tracing/PerfLog.h" #include "lib/tracing/bts_trace.h" #include "lib/utils/TimeStamp.h" -#include "lib/domain_model/Security.h" #include @@ -31,9 +31,9 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { public: MDSource(md::MDConsumer &consumer, metrics::MetricsContainer &stats, trace::PerfLog &log) - : _handles(), _pending_handles(), _status_subs(), _md_consumer(consumer), - _book_update(), _ticker_update(), _status_update(), - _perf_log(log), _stats(stats), _loop_timer(), _counter(0) { + : _handles(), _pending_handles(), _status_subs(), _md_consumer(consumer), + _book_update(), _ticker_update(), _status_update(), _perf_log(log), + _stats(stats), _loop_timer(), _counter(0) { _trades_buffer.Reserve(1000); auto cme_channels = md::get_configured_cme_channels(); @@ -67,9 +67,8 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { auto ticker_channel_cout_metric = std::make_shared>( "spark_mdsource_ticker_channel_count"); - auto status_count_metric = - std::make_shared>( - "spark_mdsource_status_count"); + auto status_count_metric = std::make_shared>( + "spark_mdsource_status_count"); _stats.publish(security_count_metric); _stats.publish(synthetic_count_metric); _stats.publish(ticker_channel_cout_metric); @@ -78,37 +77,40 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { _book_update = make_stream(); _ticker_update = make_stream(); _status_update = make_stream(); - subscribe( - [this, security_count_metric, synthetic_count_metric, - ticker_channel_cout_metric, status_count_metric](auto const &update) { - if (update.events) { - for (auto const &ev : *update.events) { - auto k = ev.security_key; + subscribe([this, security_count_metric, + synthetic_count_metric, + ticker_channel_cout_metric, + status_count_metric](auto const &update) { + if (update.events) { + for (auto const &ev : *update.events) { + auto k = ev.security_key; - switch (ev.md_type) { - case MDRequestType::BOOK: - on_book_sub(k, *synthetic_count_metric); - security_count_metric->set(_handles.size()); - break; - case MDRequestType::TICKER: - on_ticker_sub(k, *ticker_channel_cout_metric); - break; - case MDRequestType::STATUS: - on_status_sub(k); - status_count_metric->set(_status_subs.size()); - break; - } - } - } - }); + switch (ev.md_type) { + case MDRequestType::BOOK: + on_book_sub(k, *synthetic_count_metric); + security_count_metric->set(_handles.size()); + break; + case MDRequestType::TICKER: + on_ticker_sub(k, *ticker_channel_cout_metric); + break; + case MDRequestType::STATUS: + on_status_sub(k); + status_count_metric->set(_status_subs.size()); + break; + } + } + } + }); security_count_metric->set(_handles.size()); } private: - void on_poll(trace::PerfLog& log) override { + void on_poll(trace::PerfLog &log) override { - auto scoped_do_work = trace::log_scope(log, {}, "MDSource::on_poll", utils::TimeStamp::Interval::from_microseconds(2)); + auto scoped_do_work = + trace::log_scope(log, {}, "MDSource::on_poll", + utils::TimeStamp::Interval::from_microseconds(2)); // Book Updates Book book; @@ -158,11 +160,11 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { } // Status updates - for (auto& s : _status_subs) { + for (auto &s : _status_subs) { auto status = s.handle.trading_status(); if (status != s.status) { s.status = status; - publish(_status_update, SecurityKey { s.handle.key() }, status); + publish(_status_update, SecurityKey{s.handle.key()}, status); } } @@ -171,7 +173,7 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { _loop_timer->observe((start - stop).nanoseconds()); _counter += 1; - if (_counter % (2<<20) == 0) { + if (_counter % (2 << 20) == 0) { // Invoke periodic work every 2M calls on on_poll // This is approximately 20-30 seconds do_periodic_work(); @@ -180,35 +182,39 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { void do_periodic_work() { if (!_pending_handles.empty()) { - for (auto iter = _pending_handles.begin(); iter != _pending_handles.end(); ++iter) { + for (auto iter = _pending_handles.begin(); + iter != _pending_handles.end(); ++iter) { if (iter->handle->is_initialized()) { auto handle = *(iter->handle); - LOG(OrderMan, Info, "Found md for {}. Pending handle removed.", handle.key()); - switch(iter->type) { - case MDRequestType::BOOK: - _handles.push_back({utils::TimeStamp(), handle, - get_external_event_channel(handle.get_usersymbol()), - std::make_unique(securities::descriptor( - handle.get_normalized_security()))}); - break; - case MDRequestType::STATUS: - for (auto& h : _status_subs) { - // no need to reset status - if (h.handle.key() == handle.key()) break; - } - _status_subs.push_back( - StatusRecord{ handle, co2::TRADINGSTATUS_UNKNOWN }); - case MDRequestType::TICKER: + LOG(OrderMan, Info, "Found md for {}. Pending handle removed.", + handle.key()); + switch (iter->type) { + case MDRequestType::BOOK: + _handles.push_back( + {utils::TimeStamp(), handle, + get_external_event_channel(handle.get_usersymbol()), + std::make_unique(securities::descriptor( + handle.get_normalized_security()))}); + break; + case MDRequestType::STATUS: + for (auto &h : _status_subs) { + // no need to reset status + if (h.handle.key() == handle.key()) + break; + } + _status_subs.push_back( + StatusRecord{handle, co2::TRADINGSTATUS_UNKNOWN}); + case MDRequestType::TICKER: // We aren't currently monitoring for pending ticker requests break; } } } _pending_handles.erase( - std::remove_if(_pending_handles.begin(), - _pending_handles.end(), - [](const auto& h) { return h.handle->is_initialized(); }), - _pending_handles.end()); + std::remove_if( + _pending_handles.begin(), _pending_handles.end(), + [](const auto &h) { return h.handle->is_initialized(); }), + _pending_handles.end()); } } @@ -229,18 +235,18 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { auto mhandle = _md_consumer.get_managed_handle(k); if (mhandle->is_initialized()) { auto handle = *mhandle; - _handles.push_back({utils::TimeStamp(), handle, - get_external_event_channel(handle.get_usersymbol()), - std::make_unique(securities::descriptor( - handle.get_normalized_security()))}); + _handles.push_back( + {utils::TimeStamp(), handle, + get_external_event_channel(handle.get_usersymbol()), + std::make_unique( + securities::descriptor(handle.get_normalized_security()))}); if (handle.is_synthetic()) synthetic_count_metric.increment(); - } - else { - // A pending handle is a handle for security we are reasonbly sure exists - // but we haven't yet found live market data for. + } else { + // A pending handle is a handle for security we are reasonbly sure + // exists but we haven't yet found live market data for. LOG(OrderMan, Warn, "No market data for {}. Pending handle added.", k); - _pending_handles.push_back({ mhandle, MDRequestType::BOOK }); + _pending_handles.push_back({mhandle, MDRequestType::BOOK}); } } @@ -253,8 +259,17 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { void on_ticker_sub(SecurityKey sk, metrics::CounterMetric &channel_count_metric) { + auto handle = _md_consumer.get_managed_handle(sk.value()); - auto user_symbol = _md_consumer.get_handle(sk.value()).get_usersymbol(); + if (!handle->is_initialized()) { + LOG(OrderMan, Warn, + "Received ticker subscription for security {} which does not have " + "valid market data. Ignoring", + sk.value()); + return; + } + + auto user_symbol = handle->get_usersymbol(); for (auto &ch : _channels) { if (ch.user_symbol == user_symbol) { auto it = @@ -262,7 +277,7 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { [sk](auto const &ev) { return ev.key() == sk; }); if (it == ch.securities.end()) { // first time we are asked for this security, we will - // publish the trades for it next time next round + // publish the trades for it next time around LOG(OrderMan, Warn, "Starting to publish ticker updates on user symbol {} for " "security key: {} (sec count for the symbol: {} )", @@ -294,7 +309,7 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { void on_status_sub(SecurityKey sk) { auto k = sk.value(); - for (auto& h : _status_subs) { + for (auto &h : _status_subs) { if (h.handle.key() == k) { // reset status so it get resent next on_poll h.status = co2::TRADINGSTATUS_UNKNOWN; @@ -303,11 +318,11 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { } auto handle = _md_consumer.get_managed_handle(k); if (handle->is_initialized()) { - _status_subs.push_back(StatusRecord{ *handle, co2::TRADINGSTATUS_UNKNOWN }); - } - else { + _status_subs.push_back( + StatusRecord{*handle, co2::TRADINGSTATUS_UNKNOWN}); + } else { LOG(OrderMan, Warn, "No market data for {}. Pending handle added.", k); - _pending_handles.push_back({ handle, MDRequestType::STATUS }); + _pending_handles.push_back({handle, MDRequestType::STATUS}); } } @@ -337,7 +352,7 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor { md::MDConsumerHandle handle; co2::TradingStatus status; }; - boost::container::small_vector _status_subs; + boost::container::small_vector _status_subs; md::MDConsumer _md_consumer; mercury::Stream _book_update; diff --git a/src/lib/orderman/actors/OrderStore.cpp b/src/lib/orderman/actors/OrderStore.cpp index a5f350e7c..bedaf78cb 100644 --- a/src/lib/orderman/actors/OrderStore.cpp +++ b/src/lib/orderman/actors/OrderStore.cpp @@ -101,6 +101,8 @@ void OrderStore::on_order_state_update( for (auto const &ev : *u.events) { auto &rec_info = me->known_orders[ev.key]; + LOG(iLink3,Info, "Received order state update for {}", + ev.key.value()); auto &rec = rec_info.rec; bts_assert(rec.has_def()); rec.set_key(ev.key.value()); @@ -123,6 +125,8 @@ void OrderStore::on_order_definition_update( std::set modified_orders; if (u.events) for (auto const &ev : *u.events) { + LOG(iLink3,Info, "Received order definition update for {}", + ev.key.value()); auto &rec_info = me->known_orders[ev.key]; auto &rec = rec_info.rec; rec.set_key(ev.key.value()); diff --git a/src/lib/orderman/actors/ilink3/IL3Connection.h b/src/lib/orderman/actors/ilink3/IL3Connection.h new file mode 100644 index 000000000..43b8f6f40 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Connection.h @@ -0,0 +1,20 @@ +#pragma once +#include "IL3ConnectionHandler.h" +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct IL3Connection { + virtual ~IL3Connection() = default; + virtual void connect(IL3ConnectionHandler&) = 0; + virtual void disconnect() = 0; + // Switch connection but do not connect() + virtual void failover() = 0; + virtual void send(const std::string_view) = 0; + virtual void send(const std::vector&) = 0; +}; + +}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.cpp b/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.cpp new file mode 100644 index 000000000..aa1899420 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.cpp @@ -0,0 +1,10 @@ +#include "IL3ConnectionHandler.h" + + +namespace bts { +namespace orderman { +namespace ilink3 { + +IL3ConnectionHandler::~IL3ConnectionHandler() = default; + +}}} diff --git a/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.h b/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.h new file mode 100644 index 000000000..2e5a6681f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3ConnectionHandler.h @@ -0,0 +1,17 @@ +#pragma once +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct IL3ConnectionHandler { + virtual ~IL3ConnectionHandler() ; + virtual void on_connect_success() = 0; + virtual void on_disconnect() = 0; + // Send available data and length. Handler will return what it consumed + virtual size_t on_data(const std::string_view&) = 0; +}; + +}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/IL3Dispatcher.h b/src/lib/orderman/actors/ilink3/IL3Dispatcher.h new file mode 100644 index 000000000..e7e7cff79 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Dispatcher.h @@ -0,0 +1,140 @@ +#pragma once +#include +#include "IL3GeneratedFull.h" +#include "IL3MessageFramer.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +template +void handle(Handler& h, const char* data, uint16_t len) { + const FramingHeader* fheader = reinterpret_cast(data); + iLinkBinary::MessageHeader mheader { + (char*)data, sizeof(FramingHeader), fheader->message_size, + iLinkBinary::MessageHeader::sbeSchemaVersion() }; + + T t { + const_cast(data), + sizeof(FramingHeader) + iLinkBinary::MessageHeader::encodedLength(), + len, + mheader.blockLength(), + mheader.version()}; + h.handle(t); +} + + +template +void dispatch_message(H& handler, const FramingHeader* header, const char* data) { + using namespace iLinkBinary; + bts_assert_d(header->encoding_type == 0XCAFE); + MessageHeader mheader { + (char*)data, sizeof(FramingHeader), header->message_size, + MessageHeader::sbeSchemaVersion() }; + + switch(mheader.templateId()) { + case 501: handle(handler, data, header->message_size); break; + case 502: handle(handler, data, header->message_size); break; + case 504: handle(handler, data, header->message_size); break; + case 505: handle(handler, data, header->message_size); break; + case 506: handle(handler, data, header->message_size); break; + case 507: handle(handler, data, header->message_size); break; + case 509: handle(handler, data, header->message_size); break; + case 510: handle(handler, data, header->message_size); break; + case 513: handle(handler, data, header->message_size); break; + case 519: handle(handler, data, header->message_size); break; + case 521: handle(handler, data, header->message_size); break; + case 522: handle(handler, data, header->message_size); break; + case 523: handle(handler, data, header->message_size); break; + case 524: handle(handler, data, header->message_size); break; + case 525: handle(handler, data, header->message_size); break; + case 526: handle(handler, data, header->message_size); break; + case 527: handle(handler, data, header->message_size); break; + case 531: handle(handler, data, header->message_size); break; + case 532: handle(handler, data, header->message_size); break; + case 534: handle(handler, data, header->message_size); break; + case 535: handle(handler, data, header->message_size); break; + case 536: handle(handler, data, header->message_size); break; + // case 538: handle(handler, data, header->message_size); break; + // The Execution Acknowledgment message notifies CME that a given fill has either been accepted or rejected by a counterparty for EU bilateral trades. + // case 539: handle(handler, data, header->message_size); break; + // case 544: handle(handler, data, header->message_size); break; + // case 545: handle(handler, data, header->message_size); break; + // case 546: handle(handler, data, header->message_size); break; + // case 547: handle(handler, data, header->message_size); break; + case 548: handle(handler, data, header->message_size); break; + case 549: handle(handler, data, header->message_size); break; + case 550: handle(handler, data, header->message_size); break; + // case 558: handle(handler, data, header->message_size); break; + // case 561: handle(handler, data, header->message_size); break; + } +} + +template +void dispatch_execution_reports(H& handler, const FramingHeader* header, const char* data) { + using namespace iLinkBinary; + bts_assert_d(header->encoding_type == 0XCAFE); + MessageHeader mheader { + (char*)data, sizeof(FramingHeader), header->message_size, + MessageHeader::sbeSchemaVersion() }; + + switch(mheader.templateId()) { + case 522: handle(handler, data, header->message_size); break; + case 523: handle(handler, data, header->message_size); break; + case 524: handle(handler, data, header->message_size); break; + case 525: handle(handler, data, header->message_size); break; + case 526: handle(handler, data, header->message_size); break; + case 527: handle(handler, data, header->message_size); break; + case 531: handle(handler, data, header->message_size); break; + case 532: handle(handler, data, header->message_size); break; + case 534: handle(handler, data, header->message_size); break; + } +} + + +// This handler handles exchange messages for testing +template +void dispatch_exchange_message(H& handler, const FramingHeader* header, const char* data) { + using namespace iLinkBinary; + bts_assert_d(header->encoding_type == 0XCAFE); + MessageHeader mheader { + (char*)data, sizeof(FramingHeader), header->message_size, + MessageHeader::sbeSchemaVersion() }; + // Rather than trying to be exhaustive like the client + // we will only add handlers for the messages we use for testing + switch(mheader.templateId()) { + case 500: handle(handler, data, header->message_size); break; + case 503: handle(handler, data, header->message_size); break; + case 506: handle(handler, data, header->message_size); break; + case 508: handle(handler, data, header->message_size); break; + case 518: handle(handler, data, header->message_size); break; + case 514: handle(handler, data, header->message_size); break; + case 515: handle(handler, data, header->message_size); break; + case 516: handle(handler, data, header->message_size); break; + } +} + +template +size_t consume_messages( + Handler& handler, const char* data, size_t len, Dispatcher dispatch) { + // void(*dispatch)(Handler&, const FramingHeader*, const char*)) { + size_t read = 0; + while(len > sizeof(FramingHeader)) { + // read the FramingHeader + const FramingHeader* header = reinterpret_cast(data); + // Check if we can consume the message + auto msize = header->message_size; + if (msize <= len) { + read += msize; + dispatch(handler, header, data); + data += msize; + len -= msize; + } + else { + return read; + } + } + return read; +} + +}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/IL3GW.cpp b/src/lib/orderman/actors/ilink3/IL3GW.cpp new file mode 100644 index 000000000..7004bbcb8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3GW.cpp @@ -0,0 +1,662 @@ +#include "IL3GW.h" +#include "IL3Dispatcher.h" +#include "IL3GeneratedFull.h" +#include "IL3MessageFramer.h" +#include "ILink3Utils.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" +#include "lib/utils/SecureLogon.h" +#include "lib/utils/bts_assert.h" +#include "lib/utils/datetime.h" + +/* +# Some notes about session binding and initialization: # + +## Official documentation: + https://www.cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+Binary+Order+Entry+-+Session+Layer#iLink3BinaryOrderEntry-SessionLayer-WeeklyReset + +## Begining of week (new session?) +- config.session = X +- config.outgoing_sequence = 1 +-> Negotiate session=X +<- NegotiateResponse session=X, oldsession=Y, oldSeq=N + if oldSeq > 0 -> ReplayRequest +-> Establish seq=1 +<- EstablishAck oldsession=Y, oldSeq=N + +## Middle of week (same session) +- config.session = X +- config.outgoing_sequence > 1 +-> Establish seq=N +*/ + +namespace bts { +namespace orderman { +namespace ilink3 { + +log::CharPtrWrapper wrap(const char *str) { return log::CharPtrWrapper{str}; } + +IL3GW::IL3GW(IL3Connection &con, IL3MessageFramer &buffer, IL3SecDB *db, + const Session &session, const Config &conf, + config::JetFIX::Connection const *cfg) + : _config(conf), _x_state(State::INIT), _buffer(buffer), + _on_state_change([](auto) {}), _on_exe_report([](auto *) {}), + _on_session_change([](auto) {}), _connection(con), _session(session), + _msg_count(0), _time(), _pool(), _exe_parser(cfg, db), _retransmit() { + _clorid_buffer.resize(clordid_sz()); +} + +void IL3GW::connect() { + bts_assert(state() == State::INIT || state() == State::ERROR); + set_state(State::CONNECTING); + _connection.connect(*this); // -> on_connect_success +} + +// This determines the session uuid +void IL3GW::send_negotiate() { + // add 2 bytes for the empty 'credentials' (39008) length which must be + // present + auto msg = _buffer.frame( + iLinkBinary::Negotiate500::credentialsHeaderLength()); + msg.uUID(_session.uuid); + msg.requestTimestamp(_time.now()); + msg.putSession(_config.cme_session); + // We need this call to set the length of the credential block to 0 + // This behavior is specific to "data" in the xml template + msg.putCredentials("", 0); + msg.putFirm(_config.firm); + + const auto ld = glbx::calculate_hmac( + _config.cme_session, std::to_string(msg.requestTimestamp()), + std::to_string(msg.uUID()), _config.cme_session, _config.firm); + msg.putAccessKeyID(ld.access_key); + msg.putHMACSignature(ld.hmac); + + std::string temp = ld.canonical; + for (size_t x = 0; x < temp.size(); ++x) { + if (temp[x] == '\n') + temp[x] = '$'; + } + + flush(false); + // clear HMAC for json logging + msg.putHMACSignature(std::string_view{nullptr, 0}); + log_out(msg, 0); + // expect -> NegotiationResponse501 or NegotiationReject502 +} + +void IL3GW::send_establish() { + // add 2 bytes for the empty 'credentials' (39008) length which must be + // present + auto msg = _buffer.frame(2); + msg.uUID(_session.uuid); + msg.requestTimestamp(_time.now()); + msg.putSession(_config.cme_session); + msg.putCredentials("", 0); + msg.putFirm(_config.firm); + + msg.putTradingSystemName(std::string_view("SPARK")); + msg.putTradingSystemVersion(std::string_view("1")); + msg.putTradingSystemVendor(std::string_view("BTS")); + // On primary connection, the expected message sequence number of the next + // business message from customer to CME + msg.nextSeqNo(_session.to_cme); + msg.keepAliveInterval(30000); + + const auto ld = + glbx::calculate_hmac(_config.cme_session, + // RequestTimestamp + std::to_string(msg.requestTimestamp()), + std::to_string(msg.uUID()), _config.cme_session, + // Firm ID + _config.firm, + // TradingSystemName + msg.getTradingSystemNameAsString(), + // TradingSystemVersion + msg.getTradingSystemVersionAsString(), + // TradingSystemVendor + msg.getTradingSystemVendorAsString(), + // NextSeqNo + std::to_string(msg.nextSeqNo()), + // KeepAliveInterval + std::to_string(msg.keepAliveInterval())); + + msg.putAccessKeyID(ld.access_key); + msg.putHMACSignature(ld.hmac); + + flush(false); + // clear HMAC for json logging + msg.putHMACSignature(std::string_view{nullptr, 0}); + log_out(msg, 0); + // expect -> EstablishmentAck504 or EstablishmentReject505 +} + +void IL3GW::send_sequence(bool lapsed) { + auto msg = _buffer.frame(); + msg.uUID(_session.uuid); + msg.nextSeqNo(_session.to_cme); + msg.faultToleranceIndicator(iLinkBinary::FTI::NULL_VALUE); + msg.keepAliveIntervalLapsed(lapsed + ? iLinkBinary::KeepAliveLapsed::Lapsed + : iLinkBinary::KeepAliveLapsed::NotLapsed); + log_out(msg, 0); +} + +void IL3GW::send_retransmit_request(uint64_t uuid, uint32_t from, + size_t count) { + bts_assert(from > 0); + using namespace iLinkBinary; + auto msg = _buffer.frame(); + msg.uUID(_session.uuid); + msg.lastUUID(uuid); + msg.requestTimestamp(_time.now()); + msg.fromSeqNo(from); + msg.msgCount(count); + log_out(msg, 0); +} + +uint64_t IL3GW::send_party_details(const api::orderman::RoutingRecord &route) { + using namespace iLinkBinary; + + auto msg = _buffer.frame( + // 2 repeating group header. + // 1 for party details and 1 for trade reg + // This seems unsafe but the api doesn't seem to want you to know how to + // size buffers ahead of time + 2 * PartyDetailsDefinitionRequest518::NoPartyDetails::sbeHeaderSize() + + // N * size of each block + 3 * PartyDetailsDefinitionRequest518::NoPartyDetails::sbeBlockLength() + + 0 * PartyDetailsDefinitionRequest518::NoTrdRegPublications:: + sbeBlockLength()); + msg.partyDetailsListReqID(0); + msg.sendingTimeEpoch(_time.now()); + msg.listUpdateAction(ListUpdAct::Add); + msg.seqNum(next_seq()); + // msg.putMemo("") -- not supported + if (route.smp_id().empty()) { + msg.selfMatchPreventionID( + PartyDetailsDefinitionRequest518::selfMatchPreventionIDNullValue()); + } else { + auto smp_id = std::atoi(route.smp_id().c_str()); + msg.selfMatchPreventionID(smp_id); + } + msg.cmtaGiveupCD(CmtaGiveUpCD::NULL_VALUE); + msg.custOrderCapacity(map_cust_cti(route.cti_code())); + msg.clearingAccountType(map_customer_or_firm(route.customer_or_firm())); + msg.selfMatchPreventionInstruction( + map_smp_instruction(route.smp_instruction())); + msg.avgPxIndicator(AvgPxInd::NULL_VALUE); + msg.clearingTradePriceType(SLEDS::NULL_VALUE); + msg.custOrderHandlingInst(static_cast( + route.cust_order_handing_inst()[0])); + msg.executor(PartyDetailsDefinitionRequest518::executorNullValue()); + msg.iDMShortCode(PartyDetailsDefinitionRequest518::iDMShortCodeNullValue()); + + auto details = msg.noPartyDetailsCount(3); + details.next(); + details.partyDetailRole(PartyDetailRole::CustomerAccount); + details.putPartyDetailID(route.account()); + details.next(); + details.partyDetailRole(PartyDetailRole::ExecutingFirm); + // 004 in cert + details.putPartyDetailID( + std::string_view(route.sender_compid().c_str() + 3, 3)); + details.next(); + details.partyDetailRole(PartyDetailRole::Operator); + details.putPartyDetailID(std::string_view(route.sender_compid().c_str(), 3)); + msg.noTrdRegPublicationsCount(0); + // In the future we may check for existing party details definitions and + // return that id + log_out(msg, msg.seqNum()); + return 0; +} + +bool needs_stop_px(api::orderman::NativeOrderType order_type) { + return order_type == + api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_STOP || + order_type == + api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_STOP_LIMIT; +} +bool need_px(api::orderman::NativeOrderType order_type) { + return order_type != + api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_MARKET && + order_type != + api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_MARKET_LIMIT && + order_type != api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_STOP; +} + +void IL3GW::send_order(const CreateOrderMsg &create) { + bts_assert_d(create.routing_record); + bts_assert_d(create.security); + bts_assert_d(create.security->has_glbx()); + + auto party = send_party_details(*create.routing_record); + auto msg = _buffer.frame(); + + if (need_px(create.order_type)) { + msg.price().mantissa(to_price9(create.price)); + } else { + msg.price().mantissa(iLinkBinary::PRICENULL9::mantissaNullValue()); + } + msg.orderQty(create.quantity.value()); + msg.securityID(create.security->glbx().exchange_id()); + msg.side(map_side(create.side)); + msg.seqNum(next_seq()); + msg.putSenderID(create.routing_record->operator_id()); + encode_clorid(create.key, SecurityKey(create.security->id()), + &_clorid_buffer); + msg.putClOrdID(_clorid_buffer); + msg.partyDetailsListReqID(party); + msg.orderRequestID(++_msg_count); + msg.sendingTimeEpoch(_time.now()); + if (needs_stop_px(create.order_type)) { + msg.stopPx().mantissa(to_price9(create.stop_px)); + } else { + msg.stopPx().mantissa(iLinkBinary::PRICENULL9::mantissaNullValue()); + } + msg.putLocation(create.routing_record->location()); + msg.minQty(iLinkBinary::NewOrderSingle514::minQtyNullValue()); + if (create.time_in_force != api::orderman::TimeInForce::TIME_IN_FORCE_IOC) { + msg.displayQty(create.display_quantity.value()); + } else { + msg.displayQty(iLinkBinary::NewOrderSingle514::displayQtyNullValue()); + } + if (create.time_in_force == api::orderman::TimeInForce::TIME_IN_FORCE_DATE) { + // TODO: # of days since jan 1 1970 + msg.expireDate(18424); + } else { + msg.expireDate(iLinkBinary::NewOrderSingle514::expireDateNullValue()); + } + msg.ordType(map_order_type(create.order_type)); + msg.timeInForce(map_time_in_force(create.time_in_force)); + msg.manualOrderIndicator( + map_manual_order_indicator(create.manual_order_indicator)); + msg.execInst().clear(); + msg.executionMode(iLinkBinary::ExecMode::NULL_VALUE); + msg.liquidityFlag(iLinkBinary::BooleanNULL::NULL_VALUE); + msg.managedOrder(iLinkBinary::BooleanNULL::NULL_VALUE); + msg.shortSaleType(iLinkBinary::ShortSaleType::NULL_VALUE); + log_out(msg, msg.seqNum()); +} + +void IL3GW::send_cancel_replace(const CancelReplaceOrderMsg &replace) { + const auto &create = replace.create_fields; + bts_assert_d(create.routing_record); + bts_assert_d(create.security); + bts_assert_d(create.security->has_glbx()); + + auto party = send_party_details(*create.routing_record); + auto msg = _buffer.frame(); + + msg.orderID(replace.exchange_order_id.value()); + + if (need_px(create.order_type)) { + msg.price().mantissa(to_price9(create.price)); + } else { + msg.price().mantissa(iLinkBinary::PRICENULL9::mantissaNullValue()); + } + msg.orderQty(create.quantity.value()); + msg.securityID(create.security->glbx().exchange_id()); + msg.side(map_side(create.side)); + msg.seqNum(next_seq()); + msg.putSenderID(create.routing_record->operator_id()); + encode_clorid(create.key, SecurityKey(create.security->id()), + &_clorid_buffer); + msg.putClOrdID(_clorid_buffer); + msg.partyDetailsListReqID(party); + msg.orderRequestID(++_msg_count); + msg.sendingTimeEpoch(_time.now()); + if (needs_stop_px(create.order_type)) { + msg.stopPx().mantissa(to_price9(create.stop_px)); + } else { + msg.stopPx().mantissa(iLinkBinary::PRICENULL9::mantissaNullValue()); + } + msg.putLocation(create.routing_record->location()); + msg.minQty(iLinkBinary::NewOrderSingle514::minQtyNullValue()); + msg.displayQty(create.display_quantity.value()); + msg.expireDate(iLinkBinary::NewOrderSingle514::expireDateNullValue()); + msg.ordType(map_order_type(create.order_type)); + msg.timeInForce(map_time_in_force(create.time_in_force)); + msg.manualOrderIndicator( + map_manual_order_indicator(create.manual_order_indicator)); + msg.oFMOverride(iLinkBinary::OFMOverrideReq::Enabled); + msg.execInst().clear(); + msg.executionMode(iLinkBinary::ExecMode::NULL_VALUE); + msg.liquidityFlag(iLinkBinary::BooleanNULL::NULL_VALUE); + msg.managedOrder(iLinkBinary::BooleanNULL::NULL_VALUE); + msg.shortSaleType(iLinkBinary::ShortSaleType::NULL_VALUE); + log_out(msg, msg.seqNum()); +} + +void IL3GW::send_cancel(const CancelOrderMsg &cancel) { + bts_assert_d(cancel.routing_record); + bts_assert_d(cancel.security); + bts_assert_d(cancel.security->has_glbx()); + + auto party = send_party_details(*cancel.routing_record); + auto msg = _buffer.frame(); + + msg.orderID(cancel.exchange_order_id.value()); + msg.partyDetailsListReqID(party); + msg.manualOrderIndicator( + map_manual_order_indicator(cancel.manual_order_indicator)); + msg.seqNum(next_seq()); + msg.putSenderID(cancel.routing_record->operator_id()); + encode_clorid(cancel.key, SecurityKey(cancel.security->id()), + &_clorid_buffer); + msg.putClOrdID(_clorid_buffer); + msg.orderRequestID(++_msg_count); + msg.sendingTimeEpoch(_time.now()); + msg.putLocation(cancel.routing_record->location()); + msg.securityID(cancel.security->glbx().exchange_id()); + msg.side(map_side(cancel.side)); + msg.liquidityFlag(iLinkBinary::BooleanNULL::NULL_VALUE); + log_out(msg, msg.seqNum()); +} + +void IL3GW::send_terminate(uint16_t code) { + LOG(iLink3, Info, "Terminate"); + auto msg = _buffer.frame(); + msg.uUID(_session.uuid); + msg.requestTimestamp(_time.now()); + msg.errorCodes(code); + log_out(msg, 0); +} + +void IL3GW::flush(bool publish) { + _buffer.flush(_connection); + if (publish) + publish_session_update(); +} + +const char *state_string(State s) { + switch (s) { + case State::INIT: + return "INIT"; + case State::CONNECTING: + return "CONNECTING"; + case State::NEGOTIATING: + return "NEGOTIATING"; + case State::ESTABLISHING: + return "ESTABLISHING"; + case State::RETRANSMITTING: + return "RETRANSMITTING"; + case State::READY: + return "READY"; + case State::ERROR: + return "ERROR"; + } + return "UNKNOWN"; +} +log::CharPtrWrapper wstate_string(State s) { return wrap(state_string(s)); } + +void IL3GW::set_state(State s) { + if (s != _x_state) { + LOG(iLink3, Info, "ILinkGW {}: {}->{}", _session.uuid, + wstate_string(_x_state), wstate_string(s)); + _x_state = s; + if (_on_state_change) + _on_state_change(s); + } +} + +// +// IConnectionHandler + +void IL3GW::on_connect_success() { + if (!_session) { + // If we have a 0 cme_seq this is a new session and we need to negotiate + // it + LOG(iLink3, Info, "Negotiating new iLink session. {}", _session.uuid); + set_state(State::NEGOTIATING); + send_negotiate(); + } else { + // We only need to establish the current sequence number + LOG(iLink3, Info, "re-establishing existing iLink session. {}", + _session.uuid); + _session.to_cme = std::max(_session.to_cme, 1u); + set_state(State::ESTABLISHING); + send_establish(); + } +} + +void IL3GW::on_disconnect() { + LOG(iLink3, Error, "Disconnected."); + if (_config.failover_on_disconnect) { + LOG(iLink3, Error, "Attempting failover"); + _connection.failover(); + connect(); + } else { + set_state(State::ERROR); + } +} + +void IL3GW::enqueue_retransmit(uint32_t from, uint32_t to, uint64_t uuid) { + LOG(iLink3, Warn, "Prepare retransmit from: {} to: {}", from, to); + bts_assert(to >= from); + do { + // +1 because to/from are using an inclusive range + auto count = std::min(to - from + 1, Retransmit::MAX_RECOVERY); + _retransmit.push(Retransmit{uuid, from, from + count - 1}); + from += count; + } while (from < to); +} + +void IL3GW::begin_retransmit() { + if (_retransmit.empty()) + return; + auto &working = _retransmit.front(); + // Don't pop the queue because we need to know when we're done + auto count = working.to - working.from + 1; + LOG(iLink3, Warn, + "Sending retransmit for missing packets: from: {} to: {} count: {}", + working.from, working.to, count); + bts_assert_d(count <= Retransmit::MAX_RECOVERY); + send_retransmit_request(working.uuid, working.from, count); +} + +void IL3GW::on_retransmit_complete() { + // Replay is complete. Advance to go. Collect $200 + _retransmit.pop(); + LOG(iLink3, Warn, "Retransmit complete"); + if (!_retransmit.empty()) { + // More replay to do... + begin_retransmit(); + flush(); + } else { + // Replay is finished, transition to ready state. + // Since we're already established we dont' need to send anything + set_state(State::READY); + } +} + +size_t IL3GW::on_data(const std::string_view &data) { + return consume_messages(*this, data.data(), data.size(), + dispatch_message); +} + +void IL3GW::handle(const iLinkBinary::NegotiationResponse501 &msg) { + // If we're receiving a NegotiateResponse we just created a session + log_in(msg, 0); + + // NegotiationResponse indicates the session was created. CME sequence will + // be 1 + _session.from_cme = 1; + publish_session_update(); + + // Even though the CME sends a previous uuid+sequence we can't act on + // that data right now since we aren't established. We don't have to remember + // it, though, because exactly the same data comes on the EstablishmentAck + // msg.previousUUID(), msg.previousSeqNo(); + + set_state(State::ESTABLISHING); + send_establish(); +} + +void IL3GW::handle(const iLinkBinary::NegotiationReject502 &msg) { + LOG(iLink3, Error, "Negotiate Reject: {} '{}'.", msg.errorCodes(), + std::string(translate_negotiation_reject(msg.errorCodes()))); + log_in(msg, 0); + _connection.disconnect(); + set_state(State::ERROR); +} +void IL3GW::handle(const iLinkBinary::EstablishmentAck504 &msg) { + // previous uuid+sequence + auto cme_prev_uuid = msg.previousUUID(); + auto cme_prev_seq = msg.previousSeqNo(); + if (cme_prev_seq != 0 && cme_prev_uuid != _session.uuid) { + // There was a previous session and we need to replay messages from it + + // We *intend* to only have a single session each week except + // in the case of catastrophic failure. So If we log in and + // there is a previous UUID we can just replay it entirely. + // The other possibility is a session was created automatically + // to handle a fill from a GTC order from the previous week + enqueue_retransmit(1, cme_prev_seq, cme_prev_uuid); + } + + // next sequence number from the current session may also be ahead + auto cme_current_seq = msg.nextSeqNo() - 1; + if (_session.from_cme < cme_current_seq) { + // If we're behind it indicates we missed messages while disconnected + enqueue_retransmit(_session.from_cme + 1, cme_current_seq, msg.uUID()); + } + + _session.from_cme = cme_current_seq; + log_in(msg, 0); + + if (!_retransmit.empty()) { + send_sequence(); + begin_retransmit(); + flush(); + set_state(State::RETRANSMITTING); + } else { + send_sequence(); + flush(); + set_state(State::READY); + } +} +void IL3GW::handle(const iLinkBinary::EstablishmentReject505 &msg) { + LOG(iLink3, Error, "Establishment Reject: {} '{}'. NextSeq: {}.", + msg.errorCodes(), + std::string(translate_establish_reject(msg.errorCodes())), + msg.nextSeqNo()); + _connection.disconnect(); + log_in(msg, 0); + set_state(State::ERROR); +} +void IL3GW::handle(const iLinkBinary::Sequence506 &msg) { + log_in(msg, 0); + _session.from_cme = msg.nextSeqNo() - 1; + publish_session_update(); + send_sequence(); + flush(); +} +void IL3GW::handle(const iLinkBinary::Terminate507 &msg) { + // https://www.cmegroup.com/confluence/display/EPICSANDBOX/Terminate + LOG(iLink3, Error, "Terminated by exchange. Code: {} Reason: {} Text: {}", + msg.errorCodes(), wrap(msg.reason()), + wrap(translate_terminate(msg.errorCodes()))); + if (msg.errorCodes() == 11 || msg.errorCodes() == 10) { + // This indicates our sequence number is too low. We will jump + // forward one at a time. That should eventually fix it. + LOG(iLink3, Error, + "Will attempt to recover by advancing our sequence number"); + _session.to_cme++; + publish_session_update(); + } + log_in(msg, 0); + _connection.disconnect(); + set_state(State::ERROR); +} +void IL3GW::handle(const iLinkBinary::Retransmission509 &msg) { + // Accepted Retransmit + log_in(msg, 0); +} +void IL3GW::handle(const iLinkBinary::RetransmitReject510 &msg) { + LOG(iLink3, Error, "Retransmit requeste rejected. {}", + msg.getReasonAsString()); + log_in(msg, 0); + set_state(State::ERROR); +} +void IL3GW::handle(const iLinkBinary::NotApplied513 &msg) { + log_in(msg, 0); + send_sequence(); +} +void IL3GW::handle( + const iLinkBinary::PartyDetailsDefinitionRequestAck519 &msg) { + _exe_parser.set_account(msg); + handle_common(msg); +} +void IL3GW::handle(const iLinkBinary::BusinessReject521 &msg) { + LOG(iLink3, Error, "Business Reject: {} '{}'.", msg.businessRejectReason(), + wrap(translate_business_reject_reason(msg.businessRejectReason()))); + handle_common(msg); + // A business reject can de-sync the sequence number because it rejects + // the sequence number of the rejected message. Send a sequence message + // to tell the cme to advance. + send_sequence(); + flush(); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportNew522 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportReject523 &msg) { + LOG(iLink3, Error, "Execution report reject: {}", wrap(msg.text())); + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportElimination524 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportTradeOutright525 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportTradeSpread526 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportTradeSpreadLeg527 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportModify531 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportStatus532 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::ExecutionReportCancel534 &msg) { + handle_exe_report(msg); +} +void IL3GW::handle(const iLinkBinary::OrderCancelReject535 &msg) { + CancelReject cr; + bool result = _exe_parser.parse(msg, &cr); + if (result) { + _on_cancel_reject(cr); + } else { + LOG(iLink3, Error, "Failed to parse cancel reject."); + } + handle_common(msg); +} +void IL3GW::handle(const iLinkBinary::OrderCancelReplaceReject536 &msg) { + handle_common(msg); +} +void IL3GW::handle( + const iLinkBinary::ExecutionReportTradeAddendumOutright548 &msg) { + // Ignore trade correction/addendum messages for now. + // See GLBXExecutionGateway.cpp:139 for further details + handle_common(msg); +} +void IL3GW::handle( + const iLinkBinary::ExecutionReportTradeAddendumSpread549 &msg) { + // Ignore trade correction/addendum messages for now. + // See GLBXExecutionGateway.cpp:139 for further details + handle_common(msg); +} +void IL3GW::handle( + const iLinkBinary::ExecutionReportTradeAddendumSpreadLeg550 &msg) { + // Ignore trade correction/addendum messages for now. + // See GLBXExecutionGateway.cpp:139 for further details + handle_common(msg); +} + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/ilink3/IL3GW.h b/src/lib/orderman/actors/ilink3/IL3GW.h new file mode 100644 index 000000000..a5fd50472 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3GW.h @@ -0,0 +1,235 @@ +#pragma once +#include +#include +#include +#include +#include + +#include "../IExecutionGateway.h" +#include "IL3Connection.h" +#include "IL3ConnectionHandler.h" +#include "TimeKeeper.h" + +#include "IL3GeneratedFwd.h" +#include "IL3Parser.h" +#include "generated/MessageHeader.h" +#include "lib/config/protos/jetfix.pb.h" +#include "lib/orderman/actors/ilink3/RawMsg.h" +#include "lib/orderman/orderman_utils/CancelReject.h" + +#define MID_SESSION_REPLAY + +namespace bts { +namespace orderman { +class ExecutionReport; +namespace ilink3 { + +class IL3SecDB; + +struct Session { + uint64_t uuid; + // bts->cme + uint32_t to_cme; + // cme->bts + uint32_t from_cme; + + operator bool const() { return to_cme || from_cme; } +}; + +struct Config { + std::string cme_session; // NGG + std::string firm; // 004 + bool failover_on_disconnect; + std::function + raw_message_logger; +}; + +enum class State { + INIT, + CONNECTING, + NEGOTIATING, + ESTABLISHING, + RETRANSMITTING, + READY, + ERROR +}; +const char *state_string(State s); +typedef std::function OnStateChange; +typedef std::function OnExecutionReport; +typedef std::function OnSessionChange; +typedef std::function OnCancelReject; + +struct Retransmit { + static constexpr uint32_t MAX_RECOVERY = 2500; + uint64_t uuid; + uint32_t from; + uint32_t to; +}; + +class IL3MessageFramer; + +// Does not allow re-entrance +class IL3GW : IL3ConnectionHandler { + const Config _config; + State _x_state; + IL3MessageFramer &_buffer; + OnStateChange _on_state_change; + OnExecutionReport _on_exe_report; + OnSessionChange _on_session_change; + OnCancelReject _on_cancel_reject; + IL3Connection &_connection; + Session _session; + std::string _clorid_buffer; + uint32_t _msg_count; + TimeKeeper _time; + boost::object_pool _pool; + IL3Parser _exe_parser; + std::queue _retransmit; + + public: + IL3GW(IL3Connection &, IL3MessageFramer &, IL3SecDB *, const Session &, + const Config &, config::JetFIX::Connection const *); + + void connect(); + void send_order(const CreateOrderMsg &); + void send_cancel_replace(const CancelReplaceOrderMsg &); + void send_cancel(const CancelOrderMsg &); + void send_terminate(uint16_t code = 0); + void flush(bool publish = true); + void on_time(){ + // Currently we just reply to a heartbeat with another heartbeat + // Probably better to track time and send them on demand + }; + + // state change + State state() { return _x_state; } + void subscribe_state(OnStateChange o) { _on_state_change = o; } + void subscribe_execution_reports(OnExecutionReport sub) { + _on_exe_report = sub; + } + void subscribe_session(OnSessionChange cb) { _on_session_change = cb; } + void subscribe_cancel_reject(OnCancelReject cb) { _on_cancel_reject = cb; } + + // Only used for certification + void send_sequence(bool lapsed = false); + + private: + void send_negotiate(); + void send_establish(); + void send_retransmit_request(uint64_t uuid, uint32_t from, size_t count); + uint64_t send_party_details(const api::orderman::RoutingRecord &); + + private: + void set_state(State); + uint32_t next_seq() { + _session.to_cme += 1; + return _session.to_cme - 1; + } + void publish_session_update() { _on_session_change(_session); } + void on_connect_success() override; + void on_disconnect() override; + void enqueue_retransmit(uint32_t from, uint32_t to, uint64_t uuid); + void begin_retransmit(); + void on_retransmit_complete(); + + template static auto serialize(const T &msg) -> auto { + return [=]() -> auto { + RawMessageData result; + std::stringstream buffer; + buffer << msg; + result.json = buffer.str(); + result.binary = std::string( + msg.buffer() + msg.offset() - + iLinkBinary::MessageHeader::encodedLength(), + msg.decodeLength() + iLinkBinary::MessageHeader::encodedLength()); + return result; + }; + } + + template void log_in(const T &msg, size_t sn) { + _config.raw_message_logger(RawMessageDirection::INCOMING, sn, + serialize(msg)); + } + template void log_out(const T &msg, size_t sn) { + _config.raw_message_logger(RawMessageDirection::OUTGOING, sn, + serialize(msg)); + } + + // + // Message handlers + + size_t on_data(const std::string_view &) override; + + template void handle_common(const T &msg) { + auto uuid = msg.uUID(); + auto seq = msg.seqNum(); + log_in(msg, seq); + // Test if replay is copmlete + if (!_retransmit.empty() && _retransmit.front().to == seq) { + on_retransmit_complete(); + return; + } + + // Handle non-replay packet + if (uuid == _session.uuid) { +#ifdef MID_SESSION_REPLAY + // Gap detected during normal operation + auto expected = _session.from_cme + 1; + if (seq > expected) { + bool busy = !_retransmit.empty(); + enqueue_retransmit(expected, seq - 1, _session.uuid); + if (!busy) + begin_retransmit(); + flush(); + } +#endif + // msg may be a replay message with a lower sequence number + if (msg.seqNum() > _session.from_cme) { + _session.from_cme = msg.seqNum(); + publish_session_update(); + } + } + } + + template void handle_exe_report(const T &msg) { + auto *report = _pool.construct(); + bool result = _exe_parser.parse(msg, report); + if (result) { + _on_exe_report(report); + } else { + LOG(iLink3, Error, "Failed to parse error report."); + } + handle_common(msg); + } + + public: + void handle(const iLinkBinary::NegotiationResponse501 &); + void handle(const iLinkBinary::NegotiationReject502 &); + void handle(const iLinkBinary::EstablishmentAck504 &); + void handle(const iLinkBinary::EstablishmentReject505 &); + void handle(const iLinkBinary::Sequence506 &); + void handle(const iLinkBinary::Terminate507 &); + void handle(const iLinkBinary::Retransmission509 &); + void handle(const iLinkBinary::RetransmitReject510 &); + void handle(const iLinkBinary::NotApplied513 &); + void handle(const iLinkBinary::PartyDetailsDefinitionRequestAck519 &); + void handle(const iLinkBinary::BusinessReject521 &); + void handle(const iLinkBinary::ExecutionReportNew522 &); + void handle(const iLinkBinary::ExecutionReportReject523 &); + void handle(const iLinkBinary::ExecutionReportElimination524 &); + void handle(const iLinkBinary::ExecutionReportTradeOutright525 &); + void handle(const iLinkBinary::ExecutionReportTradeSpread526 &); + void handle(const iLinkBinary::ExecutionReportTradeSpreadLeg527 &); + void handle(const iLinkBinary::ExecutionReportModify531 &); + void handle(const iLinkBinary::ExecutionReportStatus532 &); + void handle(const iLinkBinary::ExecutionReportCancel534 &); + void handle(const iLinkBinary::OrderCancelReject535 &); + void handle(const iLinkBinary::OrderCancelReplaceReject536 &); + void handle(const iLinkBinary::ExecutionReportTradeAddendumOutright548 &); + void handle(const iLinkBinary::ExecutionReportTradeAddendumSpread549 &); + void handle(const iLinkBinary::ExecutionReportTradeAddendumSpreadLeg550 &); +}; + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/ilink3/IL3GeneratedFull.h b/src/lib/orderman/actors/ilink3/IL3GeneratedFull.h new file mode 100644 index 000000000..01e8319c1 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3GeneratedFull.h @@ -0,0 +1,56 @@ +#pragma once + +// +// Message templates + +// BTS -> CME +#include "generated/Negotiate500.h" +#include "generated/Establish503.h" +#include "generated/RetransmitRequest508.h" +#include "generated/NewOrderSingle514.h" +#include "generated/OrderCancelReplaceRequest515.h" +#include "generated/OrderCancelRequest516.h" +// #include "generated/MassQuote517.h" +#include "generated/PartyDetailsDefinitionRequest518.h" +// #include "generated/QuoteCancel528.h" +// #include "generated/OrderMassActionRequest529.h" +// #include "generated/OrderMassStatusRequest530.h" +// #include "generated/OrderStatusRequest533.h" +// #include "generated/PartyDetailsListRequest537.h" +// #include "generated/RequestForQuote543.h" +// #include "generated/SecurityDefinitionRequest560.h" + +// CME -> BTS +#include "generated/NegotiationResponse501.h" +#include "generated/NegotiationReject502.h" +#include "generated/EstablishmentAck504.h" +#include "generated/EstablishmentReject505.h" +#include "generated/Sequence506.h" +#include "generated/Terminate507.h" +#include "generated/Retransmission509.h" +#include "generated/RetransmitReject510.h" +#include "generated/NotApplied513.h" +#include "generated/PartyDetailsDefinitionRequestAck519.h" +#include "generated/BusinessReject521.h" +#include "generated/ExecutionReportNew522.h" +#include "generated/ExecutionReportReject523.h" +#include "generated/ExecutionReportElimination524.h" +#include "generated/ExecutionReportTradeOutright525.h" +#include "generated/ExecutionReportTradeSpread526.h" +#include "generated/ExecutionReportTradeSpreadLeg527.h" +#include "generated/ExecutionReportModify531.h" +#include "generated/ExecutionReportStatus532.h" +#include "generated/ExecutionReportCancel534.h" +#include "generated/OrderCancelReject535.h" +#include "generated/OrderCancelReplaceReject536.h" +// #include "generated/PartyDetailsListReport538.h" +#include "generated/ExecutionAck539.h" +// #include "generated/NewOrderCross544.h" +// #include "generated/MassQuoteAck545.h" +// #include "generated/RequestForQuoteAck546.h" +// #include "generated/QuoteCancelAck547.h" +#include "generated/ExecutionReportTradeAddendumOutright548.h" +#include "generated/ExecutionReportTradeAddendumSpread549.h" +#include "generated/ExecutionReportTradeAddendumSpreadLeg550.h" +// #include "generated/OrderMassActionReport558.h" +// #include "generated/SecurityDefinitionResponse561.h" \ No newline at end of file diff --git a/src/lib/orderman/actors/ilink3/IL3GeneratedFwd.h b/src/lib/orderman/actors/ilink3/IL3GeneratedFwd.h new file mode 100644 index 000000000..3446e9e3a --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3GeneratedFwd.h @@ -0,0 +1,37 @@ +#pragma once + +namespace iLinkBinary { + class Negotiate500; + class Establish503; + class RetransmitRequest508; + class NewOrderSingle514; + class OrderCancelReplaceRequest515; + class OrderCancelRequest516; + class PartyDetailsDefinitionRequest518; + class NegotiationResponse501; + class NegotiationReject502; + class EstablishmentAck504; + class EstablishmentReject505; + class Sequence506; + class Terminate507; + class Retransmission509; + class RetransmitReject510; + class NotApplied513; + class PartyDetailsDefinitionRequestAck519; + class BusinessReject521; + class ExecutionReportNew522; + class ExecutionReportReject523; + class ExecutionReportElimination524; + class ExecutionReportTradeOutright525; + class ExecutionReportTradeSpread526; + class ExecutionReportTradeSpreadLeg527; + class ExecutionReportModify531; + class ExecutionReportStatus532; + class ExecutionReportCancel534; + class OrderCancelReject535; + class OrderCancelReplaceReject536; + class ExecutionAck539; + class ExecutionReportTradeAddendumOutright548; + class ExecutionReportTradeAddendumSpread549; + class ExecutionReportTradeAddendumSpreadLeg550; +} diff --git a/src/lib/orderman/actors/ilink3/IL3MessageFramer.h b/src/lib/orderman/actors/ilink3/IL3MessageFramer.h new file mode 100644 index 000000000..3a93b8029 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3MessageFramer.h @@ -0,0 +1,58 @@ +#pragma once +#include +#include +#include "IL3Connection.h" +#include "IL3ReceiveBuffer.h" + +#include "generated/MessageHeader.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct FramingHeader { + uint16_t message_size; + uint16_t encoding_type; +}; + +class IL3MessageFramer { + std::vector _buffer_ptrs; + IL3ReceiveBuffer _memory; + +public: + IL3MessageFramer(): + _buffer_ptrs(), _memory() + { + _buffer_ptrs.reserve(512); + } + ~IL3MessageFramer() = default; + + // + // Framing + template + Msg frame(size_t extra=0) { + auto size = + sizeof(FramingHeader) + + iLinkBinary::MessageHeader::encodedLength() + + Msg::sbeBlockLength() + + extra; + auto buffer = _memory.allocate(size); + _memory.advance(size); + FramingHeader* fhead = (FramingHeader*)(buffer.data()); + fhead->message_size = size; + fhead->encoding_type = 0xCAFE; + Msg msg; + msg.wrapAndApplyHeader(const_cast(buffer.data()), sizeof(FramingHeader), size+sizeof(FramingHeader)); + _buffer_ptrs.push_back(buffer); + return msg; + } + + void flush(IL3Connection& connection) { + if (!_buffer_ptrs.empty()) { + connection.send(_buffer_ptrs); + _buffer_ptrs.clear(); + } + } +}; + +}}} //namespace \ No newline at end of file diff --git a/src/lib/orderman/actors/ilink3/IL3Parser.cpp b/src/lib/orderman/actors/ilink3/IL3Parser.cpp new file mode 100644 index 000000000..e0cc49e18 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Parser.cpp @@ -0,0 +1,361 @@ + +#include "IL3Parser.h" + +#include "IL3Dispatcher.h" +#include "IL3GeneratedFull.h" +#include "ILink3Utils.h" +#include "lib/domain_model/Security.h" +#include "lib/md/IntPrice.h" +#include "lib/orderman/actors/ilink3/IL3SecDB.h" +#include "lib/orderman/orderman_utils/CancelReject.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" +#include "lib/orderman/orderman_utils/orderman_common.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +IL3Parser::IL3Parser(config::JetFIX::Connection const *cfg, IL3SecDB *db) + : most_recent_account(), cfg(cfg), db(db) {} + +const api::Security *IL3Parser::get_security(SecurityKey id) { + if (db) + return db->get_security(id); + else + return nullptr; +} + +const api::Security *IL3Parser::get_security(ExchangeSecurityKey id) { + if (db) + return db->get_security(id); + else + return nullptr; +} + +template +bool IL3Parser::parse_common(const T &msg, ExecutionReport *data) { + data->account_name = most_recent_account; + static_assert(sizeof(OperatorID) == T::senderIDLength()); + memcpy(&data->operator_id.value(), msg.senderID(), msg.senderIDLength()); + data->exchange = api::VENUE_GLBX; + data->exchange_order_id = ExchangeOrderID64{msg.orderID()}; + data->leg_security = nullptr; + data->manual_order_indicator = + map_manual_order_indicator(msg.manualOrderIndicator()); + data->msg_seq_num = msg.seqNum(); + SecurityKey sk; + decode_clorid(msg.clOrdID(), &data->order_key, &sk); + auto sec = get_security(sk); + if (!sec) { + LOG(iLink3, Error, + "Cannot resolve security key {} in order {}. Clorid: {} Exchange " + "order id: {}", + sk.value(), data->order_key.value(), std::string(msg.clOrdID()), + msg.orderID()); + return false; + } + data->security = sec; + data->order_type = map_order_type(msg.ordType()); + auto &price = const_cast(msg).price(); + data->price = securities::decode_exchange_price( + *sec, Price{price.mantissa() * md::pow10(price.exponent())}); + data->quantity = Quantity{msg.orderQty()}; + data->side = map_side(msg.side()); + auto &stop_price = const_cast(msg).stopPx(); + data->stop_price = securities::decode_exchange_price( + *sec, Price{stop_price.mantissa() * md::pow10(stop_price.exponent())}); + data->time_in_force = map_time_in_force(msg.timeInForce()); + data->transact_time = ExchangeTimeStamp64{msg.transactTime()}; + data->ice_cl_ord_id = 0; + data->ice_company_id = 0; + data->cfg = cfg; + return true; +} + +template +void IL3Parser::parse_trade(const T &msg, ExecutionReport *data) { + orderman::to_array(msg.getExecIDAsStringView(), + &data->exchange_fill_id.value()); + switch (msg.ordStatus()) { + case iLinkBinary::OrdStatusTrd::Filled: + data->order_status = + api::orderman::NativeOrderStatus::NATIVE_ORDER_STATUS_FILLED; + data->exec_type = api::orderman::EXEC_TYPE_FILL; + break; + case iLinkBinary::OrdStatusTrd::PartiallyFilled: + data->order_status = api::orderman::NativeOrderStatus:: + NATIVE_ORDER_STATUS_PARTIALLY_FILLED; + data->exec_type = api::orderman::EXEC_TYPE_PARTIAL_FILL; + break; + default: + data->order_status = + api::orderman::NativeOrderStatus::NATIVE_ORDER_STATUS_UNDEFINED; + } + data->last_shares = Quantity{msg.lastQty()}; + auto &price = const_cast(msg).lastPx(); + if (data->leg_security) { + data->last_price = securities::decode_exchange_price( + *data->leg_security, + Price{price.mantissa() * md::pow10(price.exponent())}); + } else { + data->last_price = securities::decode_exchange_price( + *data->security, + Price{price.mantissa() * md::pow10(price.exponent())}); + } + data->filled_quantity = Quantity{msg.cumQty()}; +} + +bool IL3Parser::has_account() const { + return strlen(most_recent_account.value().data()); +} + +bool IL3Parser::parse(const iLinkBinary::ExecutionReportNew522 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + data->avg_price = Price{0.0}; + data->cust_order_handling_inst = ""; + data->exchange_fill_id = ExchangeFillID{}; + data->exec_type = api::orderman::EXEC_TYPE_NEW; + data->filled_quantity = Quantity{0}; + data->last_price = Price{0.0}; + data->last_shares = Quantity{0}; + data->max_show = Quantity{0}; + data->memo = ""; + data->msg = ""; + data->order_status = api::orderman::NativeOrderStatus(*msg.ordStatus()); + return true; + } else + return false; +} + +template +bool try_parse_exe_report_helper(IL3Parser &parser, std::string_view const &msg, + ExecutionReport *out) { + + iLinkBinary::MessageHeader mheader{ + (char *)msg.data(), 0, msg.size(), + iLinkBinary::MessageHeader::sbeSchemaVersion()}; + + if (mheader.templateId() == ER::sbeTemplateId()) { + return parser.parse( + ER{(char *)msg.data(), iLinkBinary::MessageHeader::encodedLength(), + msg.size(), mheader.blockLength(), mheader.version()}, + out); + } + return false; +} + +std::optional +IL3Parser::try_parse_exe_report(std::string_view const &msg) { + using namespace iLinkBinary; + + if (has_account()) { + ExecutionReport report; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper( + *this, msg, &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper( + *this, msg, &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + if (try_parse_exe_report_helper(*this, msg, + &report)) + return {report}; + } + + iLinkBinary::MessageHeader mheader{ + (char *)msg.data(), 0, msg.size(), + iLinkBinary::MessageHeader::sbeSchemaVersion()}; + + if (mheader.templateId() == + PartyDetailsDefinitionRequestAck519::sbeTemplateId()) + set_account(PartyDetailsDefinitionRequestAck519{ + (char *)msg.data(), iLinkBinary::MessageHeader::encodedLength(), + msg.size(), mheader.blockLength(), mheader.version()}); + return {}; +} + +bool IL3Parser::parse(const iLinkBinary::ExecutionReportReject523 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + data->order_status = api::orderman::NativeOrderStatus(*msg.ordStatus()); + data->msg = msg.getTextAsStringView(); + return true; + } else + return false; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportElimination524 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + data->order_status = api::orderman::NativeOrderStatus(*msg.ordStatus()); + return true; + } else + return false; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportTradeOutright525 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + parse_trade(msg, data); + return true; + } else + return false; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportTradeSpread526 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + parse_trade(msg, data); + return true; + } else + return false; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportTradeSpreadLeg527 &msg, + ExecutionReport *data) { + data->account_name = most_recent_account; + data->avg_price = Price{0.0}; + static_assert(sizeof(OperatorID) == + iLinkBinary::ExecutionReportTradeSpread526::senderIDLength()); + memcpy(&data->operator_id.value(), msg.senderID(), msg.senderIDLength()); + data->exchange = api::VENUE_GLBX; + data->exchange_order_id = ExchangeOrderID64{msg.orderID()}; + + data->msg_seq_num = msg.seqNum(); + SecurityKey sk; + decode_clorid(msg.clOrdID(), &data->order_key, &sk); + auto sec = get_security(sk); + if (!sec) { + LOG(iLink3, Error, + "Cannot resolve security key {} in order {}. Clorid: {} Exchange " + "order id: {}", + sk.value(), data->order_key.value(), std::string(msg.clOrdID()), + msg.orderID()); + return false; + } + data->security = sec; + + data->leg_security = + get_security(ExchangeSecurityKey{(uint64_t)msg.securityID()}); + if (data->leg_security == nullptr) { + LOG(iLink3, Error, + "Received execution report for an unknown spread leg" + "security {}. Will not be " + " able to process this report. This is likely a " + "bug that could lead to" + " lost leg fills. Please investigate. Spread sec_key: {} leg " + "exchange " + "security id: {}", + sk.value(), msg.securityID()); + return false; + } + data->order_type = map_order_type(msg.ordType()); + auto &price = + const_cast(msg) + .lastPx(); + data->price = securities::decode_exchange_price( + *data->leg_security, + Price{price.mantissa() * md::pow10(price.exponent())}); + data->quantity = Quantity{0}; + data->side = map_side(msg.side()); + data->stop_price = Price{0.0}; + data->time_in_force = api::orderman::TimeInForce::TIME_IN_FORCE_UNDEFINED; + data->transact_time = ExchangeTimeStamp64{msg.transactTime()}; + data->ice_cl_ord_id = 0; + data->ice_company_id = 0; + data->cfg = cfg; + parse_trade(msg, data); + return true; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportModify531 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + data->order_status = api::orderman::NativeOrderStatus(*msg.ordStatus()); + return true; + } else + return false; +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportStatus532 &msg, + ExecutionReport *data) { + return parse_common(msg, data); +} +bool IL3Parser::parse(const iLinkBinary::ExecutionReportCancel534 &msg, + ExecutionReport *data) { + if (parse_common(msg, data)) { + data->order_status = api::orderman::NativeOrderStatus(*msg.ordStatus()); + return true; + } else + return false; +} + +bool IL3Parser::parse(const iLinkBinary::OrderCancelReject535 &msg, + CancelReject *cr) { + SecurityKey sk; + OrderKey ok; + decode_clorid(msg.clOrdID(), &ok, &sk); + cr->order_key = ok; + cr->reject_msg = msg.getTextAsStringView(); + // https://www.cmegroup.com/confluence/display/EPICSANDBOX/iLink+Reject+Codes + if (msg.cxlRejReason() == 2045) + cr->reason = CancelRejectReason::UnknownOrder; + else + cr->reason = CancelRejectReason::Other; + return true; +} + +void IL3Parser::set_account( + const iLinkBinary::PartyDetailsDefinitionRequestAck519 &msg) { + // When using on-demand format the PartyDetailsDefinitionRequestAck519 + // is sent back immediately preceding the execution report on the wire. + auto details = + const_cast(msg) + .noPartyDetails(); + while (details.hasNext()) { + details.next(); + if (details.partyDetailRole() == + iLinkBinary::PartyDetailRole::CustomerAccount) { + const char *p_account = details.partyDetailID(); + strncpy(most_recent_account.value().data(), p_account, + most_recent_account.value().size()); + break; + } + } +} + +struct ParseHandler { + IL3Parser &parser; + ExecutionReport *result; + bool success = false; + template void handle(const T &t) { + success = parser.parse(t, result); + } + void handle(iLinkBinary::PartyDetailsDefinitionRequestAck519 &t) { + parser.set_account(t); + } +}; + +bool parse_report(const std::string &data, IL3Parser &parser, + ExecutionReport *result) { + ParseHandler handler{parser, result}; + consume_messages(handler, data.c_str(), data.size(), + dispatch_execution_reports); + return handler.success; +} + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/ilink3/IL3Parser.h b/src/lib/orderman/actors/ilink3/IL3Parser.h new file mode 100644 index 000000000..d08c16ba4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Parser.h @@ -0,0 +1,46 @@ +#pragma once + +#include "lib/orderman/orderman_utils/ExecutionReport.h" +#include "IL3GeneratedFwd.h" +#include "lib/md/SecurityOracle.h" +#include "lib/md/ExchangeSecurityKey.h" +#include +#include + +namespace bts { +namespace orderman { +class CancelReject; +namespace ilink3 { + +class IL3SecDB; + +class IL3Parser { + AccountName most_recent_account; + config::JetFIX::Connection const *cfg; + IL3SecDB *db; + const api::Security* get_security(SecurityKey); + const api::Security* get_security(ExchangeSecurityKey); + +public: + IL3Parser(config::JetFIX::Connection const *, IL3SecDB *sec_db); + bool parse(const iLinkBinary::ExecutionReportNew522&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportReject523&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportElimination524&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportTradeOutright525&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportTradeSpread526&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportTradeSpreadLeg527&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportModify531&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportStatus532&, ExecutionReport*); + bool parse(const iLinkBinary::ExecutionReportCancel534&, ExecutionReport*); + bool parse(const iLinkBinary::OrderCancelReject535&, CancelReject*); + void set_account(const iLinkBinary::PartyDetailsDefinitionRequestAck519&); + bool has_account() const; + std::optional try_parse_exe_report(std::string_view const&bytes); +private: + template bool parse_common(const T&, ExecutionReport*); + template void parse_trade(const T&, ExecutionReport*); +}; + +bool parse_report(const std::string&, IL3Parser&, ExecutionReport*); + +}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/IL3Reactor.cpp b/src/lib/orderman/actors/ilink3/IL3Reactor.cpp new file mode 100644 index 000000000..45884697b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Reactor.cpp @@ -0,0 +1,221 @@ +#include "IL3Reactor.h" + +#include "lib/utils/bts_assert.h" +#include "IL3ReceiveBuffer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct IL3Reactor::Connection : public IL3Connection { + int epoll_fd; + int fd; + bool is_connected; + IL3ConnectionHandler* handler; + std::queue end_points; + IL3ReceiveBuffer rc_buffer; + + Connection(int epoll_fd, const std::vector& end_points): + epoll_fd(epoll_fd), fd(0), is_connected(false), handler(nullptr), + end_points(std::deque { end_points.begin(), end_points.end() }), + rc_buffer() + { } + ~Connection() { + if (is_connected) disconnect(); + } + + void connect(IL3ConnectionHandler& h) override { + bts_assert(!is_connected); + handler = &h; + + fd = socket(AF_INET, SOCK_STREAM, 0); + int flag = 1; + auto result = ::setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int)); + bts_assert(result == 0); + bts_assert(fd >= 0); + + struct sockaddr_in serv_addr; + memset(&serv_addr, '0', sizeof(serv_addr)); + + auto end_point = current_end_point(); + auto& host = end_point.host; + auto port = end_point.port; + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(port); + result = inet_pton(AF_INET, host.c_str(), &serv_addr.sin_addr); + bts_assert(result > 0); + + result = ::connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); + if (result < 0) { + auto er = errno; + char msg[256]; + LOG(iLink3, Error, "Failed to connect: {} {}:{}", + std::string(strerror_r(er, msg, sizeof(msg))),host,port); + disconnect(); + } + else { + int flag = 1; + result = ::setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, + sizeof(int)); + bts_assert(result == 0); + + epoll_event ev; + ev.events = EPOLLIN | EPOLLHUP | EPOLLERR | EPOLLRDHUP; + ev.data.ptr = this; + auto result = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev); + bts_assert_msg(result == 0, "epoll"); + is_connected = true; + handler->on_connect_success(); + } + } + + void disconnect() override { + if (fd) close(fd); + fd = 0; + is_connected = false; + handler->on_disconnect(); + } + + void send(const std::string_view data) override { + if (!is_connected) { + LOG(iLink3, Error, "Attempted to send on closed connection. {}:{}", current_end_point().host, current_end_point().port); + return; + } + auto result = write(fd, data.data(), data.size()); + if (result < 0) { + auto er = errno; + char msg[256]; + auto host = current_end_point().host; + auto port = current_end_point().port; + LOG(iLink3, Warn, "Could not write to reactor connection. {}:{}", + std::string(strerror_r(er, msg, sizeof(msg))),host,port); + disconnect(); + } + } + + void send(const std::vector& dt) override { + if (!is_connected) { + LOG(iLink3, Error, "Attempted to send on closed connection. {}:{}", current_end_point().host, current_end_point().port); + return; + } + + iovec *iv = (iovec*)alloca(sizeof(iovec)*dt.size()); + for (size_t i = 0; i < dt.size();i++) { + iv[i].iov_base = (void*)dt[i].data(); + iv[i].iov_len = dt[i].size(); + } + auto result = ::writev(fd,iv,dt.size()); + if (result < 0) { + auto er = errno; + char msg[256]; + auto host = current_end_point().host; + auto port = current_end_point().port; + LOG(iLink3, Warn, "Could not write to reactor connection. {}:{}", + std::string(strerror_r(er, msg, sizeof(msg))),host,port); + disconnect(); + } + } + + void on_data(const std::string_view data) { + bts_assert_d(is_connected); + // Copy input data into a permanent buffer + rc_buffer.append(data); + bts_assert_d(rc_buffer.unread() > 0); + auto read = handler->on_data(rc_buffer.data()); + rc_buffer.advance(read); + } + + void failover() override { + bts_assert(!is_connected); + next_end_point(); + } + + TCPEndpoint current_end_point() { + return end_points.front(); + } + + void next_end_point() { + auto next = end_points.front(); + end_points.pop(); + end_points.push(next); + } +}; + +struct IL3Reactor::PImpl { + int epoll_fd = -1; + std::vector> connections; +}; + +IL3Reactor::IL3Reactor() : me(new PImpl()) { + me->epoll_fd = epoll_create(100); + bts_assert(me->epoll_fd >= 0); +} +IL3Reactor::~IL3Reactor() { + me->connections.clear(); + close(me->epoll_fd); + me->epoll_fd = -1; +} + +IL3Connection& IL3Reactor::register_connection(const std::vector& end_points) { + me->connections.emplace_back( + std::make_unique(me->epoll_fd, end_points)); + return *me->connections.back(); +} + +[[gnu::noinline]] +void non_inline_assert() { + bts_assert(false); +} + +constexpr bool has_error(int events) { + return events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP); +} + +void IL3Reactor::do_work() { + std::array ev_list; + auto ready = epoll_wait(me->epoll_fd, ev_list.data(), ev_list.size(), 0); + if (ready == -1) { + if (errno == EINTR) return; + else non_inline_assert(); + } + + for (int i = 0; i < ready; ++i) { + auto& ev = ev_list[i]; + auto handler = (Connection*)(ev.data.ptr); + if (ev.events & EPOLLIN) { + char buffer[4096]; + auto sz = read(handler->fd, buffer, sizeof(buffer)); + if (sz > 0) { + bts_assert_d(handler->is_connected); + handler->on_data(std::string_view(buffer, sz)); + } + else if (has_error(ev.events)) { + handler->disconnect(); + } + } + else if (has_error(ev.events)) { + // if EPOLLIN was set along with + // EPOLLHUP/EPOLLERR/EPOLLRDHUP, we pretend it is a normal + // read so that we drain the bytes in the socket. The error + // or hup condition would remain and we would catch in the + // next iteration. + handler->disconnect(); + } + } +} + +}}} //namespace diff --git a/src/lib/orderman/actors/ilink3/IL3Reactor.h b/src/lib/orderman/actors/ilink3/IL3Reactor.h new file mode 100644 index 000000000..cd299466d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3Reactor.h @@ -0,0 +1,33 @@ +#pragma once + +#include "IL3Connection.h" +#include "IL3ConnectionHandler.h" + +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct TCPEndpoint { + std::string host; + uint16_t port; +}; + +class IL3Reactor { + struct PImpl; + struct Connection; + + std::unique_ptr me; + +public: + IL3Reactor(); + ~IL3Reactor(); + + IL3Connection& register_connection(const std::vector&); + + void do_work(); +}; + +}}} //namespace diff --git a/src/lib/orderman/actors/ilink3/IL3ReceiveBuffer.h b/src/lib/orderman/actors/ilink3/IL3ReceiveBuffer.h new file mode 100644 index 000000000..f21558047 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3ReceiveBuffer.h @@ -0,0 +1,77 @@ +#pragma once +#include "lib/utils/bts_assert.h" +#include +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +class IL3ReceiveBuffer { + std::list> buffers; + size_t read_pos, write_pos; + size_t buffer_size; + +public: + IL3ReceiveBuffer(size_t size = 1024*1024) : buffers(), read_pos(0), write_pos(0), buffer_size(size) { + add_buffer(size); + } + + void append(const std::string_view& data) { + auto dest = allocate(data.size()); + memcpy(const_cast(dest.data()), data.data(), data.size()); + } + + std::string_view allocate(size_t size) { + // If we have enough space append the data + if (size <= available_write_space()) { + char* write_ptr = buffers.back().data() + write_pos; + write_pos += size; + return std::string_view(write_ptr, size); + } + else { + // If we don't have enough space... + // Compute the minimum size of the new buffer + auto min_size = unread() + size; + // allocate a new buffer + const auto& prev_buffer = buffers.back(); + auto prev_read = read_pos; + auto prev_write = write_pos; + add_buffer(std::max(buffer_size, min_size)); + // copy unread portion of old buffer + the new data into the new buffer + auto unread_sz = prev_write - prev_read; + memcpy(buffers.back().data(), prev_buffer.data()+prev_read, unread_sz); + write_pos = unread_sz; + bts_assert_d(size <= available_write_space()); + return allocate(size); + } + } + + void advance(size_t consumed) { + read_pos += consumed; + bts_assert_d(read_pos <= write_pos); + } + + size_t unread() const { + return write_pos - read_pos; + } + + const std::string_view data() const { + return std::string_view(buffers.back().data()+read_pos, unread()); + } + +private: + size_t available_write_space() const { + return buffers.back().size() - write_pos; + } + + void add_buffer(size_t size) { + buffers.emplace_back(std::vector()); + buffers.back().resize(size); + read_pos = write_pos = 0; + } +}; + + +}}} //namespace diff --git a/src/lib/orderman/actors/ilink3/IL3SecDB.h b/src/lib/orderman/actors/ilink3/IL3SecDB.h new file mode 100644 index 000000000..65e7ba3b4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/IL3SecDB.h @@ -0,0 +1,40 @@ +#pragma once + +#include "lib/domain_model/Security.pb.h" +#include "lib/domain_model/SecurityKey.h" +#include "lib/md/ExchangeSecurityKey.h" +#include "lib/md/SecurityOracle.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +class IL3SecDB { +public: + IL3SecDB(md::SecurityOracle& oracle) : oracle(oracle) {} + + void add_security(const api::Security &sec) { + auto id = SecurityKey{sec.id()}; + security_by_key[id] = &sec; + auto ex_id = ExchangeSecurityKey{sec.glbx().exchange_id()}; + security_by_exchange_key[ex_id] = &sec; + } + const api::Security *get_security(SecurityKey sk) { + auto &sec = security_by_key[sk]; + if (!sec) + sec = oracle.get_security(sk); + return sec; + } + const api::Security *get_security(ExchangeSecurityKey k) { + auto &sec = security_by_exchange_key[k]; + if (!sec) + sec = oracle.get_security(k); + return sec; + } + +private: + md::SecurityOracle oracle; + std::unordered_map security_by_key; + std::unordered_map security_by_exchange_key; +}; +}}} diff --git a/src/lib/orderman/actors/ilink3/ILink3Utils.cpp b/src/lib/orderman/actors/ilink3/ILink3Utils.cpp new file mode 100644 index 000000000..9bba8d3dd --- /dev/null +++ b/src/lib/orderman/actors/ilink3/ILink3Utils.cpp @@ -0,0 +1,528 @@ +#include "ILink3Utils.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" +#include "lib/utils/base62.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +iLinkBinary::SideReq::Value map_side(api::Side side) { + switch (side) { + case api::Side::SIDE_BUY: + return iLinkBinary::SideReq::Buy; + case api::Side::SIDE_SELL: + return iLinkBinary::SideReq::Sell; + default: + return iLinkBinary::SideReq::NULL_VALUE; + } +} + +api::Side map_side(iLinkBinary::SideReq::Value side) { + switch (side) { + case iLinkBinary::SideReq::Buy: + return api::Side::SIDE_BUY; + case iLinkBinary::SideReq::Sell: + return api::Side::SIDE_SELL; + default: + return api::Side::SIDE_UNDEFINED; + } +} + +iLinkBinary::OrderTypeReq::Value +map_order_type(api::orderman::NativeOrderType ot) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (ot) { + case NativeOrderType::NATIVE_ORDER_TYPE_MARKET: + return OrderTypeReq::MarketwithProtection; + case NativeOrderType::NATIVE_ORDER_TYPE_LIMIT: + return OrderTypeReq::Limit; + case NativeOrderType::NATIVE_ORDER_TYPE_STOP: + return OrderTypeReq::StopwithProtection; + case NativeOrderType::NATIVE_ORDER_TYPE_STOP_LIMIT: + return OrderTypeReq::StopLimit; + case NativeOrderType::NATIVE_ORDER_TYPE_MARKET_LIMIT: + return OrderTypeReq::MarketWithLeftoverAsLimit; + default: + return iLinkBinary::OrderTypeReq::NULL_VALUE; + } +} + +api::orderman::NativeOrderType +map_order_type(iLinkBinary::OrderType::Value ot) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (ot) { + case OrderType::MarketWithProtection: + return NativeOrderType::NATIVE_ORDER_TYPE_MARKET; + case OrderType::Limit: + return NativeOrderType::NATIVE_ORDER_TYPE_LIMIT; + case OrderType::StopLimit: + return NativeOrderType::NATIVE_ORDER_TYPE_STOP_LIMIT; + case OrderType::MarketWithLeftoverAsLimit: + return NativeOrderType::NATIVE_ORDER_TYPE_MARKET_LIMIT; + case OrderType::NULL_VALUE: + return NativeOrderType::NATIVE_ORDER_TYPE_UNDEFINED; + } + return NativeOrderType::NATIVE_ORDER_TYPE_UNDEFINED; +} + +iLinkBinary::TimeInForce::Value +map_time_in_force(api::orderman::TimeInForce tif) { + using namespace api::orderman; + switch (tif) { + case TimeInForce::TIME_IN_FORCE_DATE: + return iLinkBinary::TimeInForce::GoodTillDate; + case TimeInForce::TIME_IN_FORCE_DAY: + return iLinkBinary::TimeInForce::Day; + case TimeInForce::TIME_IN_FORCE_GTC: + return iLinkBinary::TimeInForce::GoodTillCancel; + case TimeInForce::TIME_IN_FORCE_IOC: + return iLinkBinary::TimeInForce::FillAndKill; + default: + return iLinkBinary::TimeInForce::NULL_VALUE; + } +} + +api::orderman::TimeInForce +map_time_in_force(iLinkBinary::TimeInForce::Value tif) { + using namespace api::orderman; + switch (tif) { + case iLinkBinary::TimeInForce::Day: + return TimeInForce::TIME_IN_FORCE_DAY; + case iLinkBinary::TimeInForce::GoodTillCancel: + return TimeInForce::TIME_IN_FORCE_GTC; + case iLinkBinary::TimeInForce::FillOrKill: + return TimeInForce::TIME_IN_FORCE_IOC; + default: + return TimeInForce::TIME_IN_FORCE_UNDEFINED; + } +} + +iLinkBinary::ManualOrdIndReq::Value +map_manual_order_indicator(api::orderman::ManualOrderIndicator moi) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (moi) { + case ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO: + return ManualOrdIndReq::Automated; + case ManualOrderIndicator::MANUAL_ORDER_INDICATOR_YES: + return ManualOrdIndReq::Manual; + default: + return ManualOrdIndReq::NULL_VALUE; + } +} + +api::orderman::ManualOrderIndicator +map_manual_order_indicator(iLinkBinary::ManualOrdIndReq::Value moi) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (moi) { + case ManualOrdIndReq::Automated: + return ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO; + case ManualOrdIndReq::Manual: + return ManualOrderIndicator::MANUAL_ORDER_INDICATOR_YES; + default: + return ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO; + } +} + +iLinkBinary::ClearingAcctType::Value +map_customer_or_firm(api::orderman::CustomerOrFirm c) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (c) { + case CustomerOrFirm::CUSTOMER_OR_FIRM_CUSTOMER: + return ClearingAcctType::Customer; + case CustomerOrFirm::CUSTOMER_OR_FIRM_FIRM: + return ClearingAcctType::Firm; + default: + return ClearingAcctType::NULL_VALUE; + } +} +iLinkBinary::SMPI::Value +map_smp_instruction(api::orderman::SelfMatchPreventionInstruction smpi) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (smpi) { + case SELF_MATCH_PREVENTION_INSTRUCTION_CANCEL_RESTING: + return SMPI::CancelOldest; + case SELF_MATCH_PREVENTION_INSTRUCTION_CANCEL_AGRESSING: + return SMPI::CancelNewest; + default: + return SMPI::NULL_VALUE; + } +} + +iLinkBinary::CustOrderCapacity::Value +map_cust_cti(api::orderman::CTICode code) { + using namespace api::orderman; + using namespace iLinkBinary; + switch (code) { + case CTI_CODE_CTI_CODE1: + return CustOrderCapacity::Membertradingfortheirownaccount; + case CTI_CODE_CTI_CODE2: + return CustOrderCapacity::Clearingfirmtradingforitsproprietaryaccount; + case CTI_CODE_CTI_CODE3: + return CustOrderCapacity::Membertradingforanothermember; + case CTI_CODE_CTI_CODE4: + return CustOrderCapacity::Allother; + default: + case CTI_CODE_UNDEFINED: + return CustOrderCapacity::NULL_VALUE; + } +} + +const char *translate_business_reject_reason(int reason) { + switch (reason) { + case 0: + return "Other"; + case 1: + return "Unknown ID (unknown PartyDetailsListReqID being referenced in " + "business message)"; + case 2: + return "Unknown Security"; + case 3: + return "Unsupported Message Type (for example using messages specific to " + "cash markets for futures)"; + case 5: + return "Required Field Missing"; + case 6: + return "Not Authorized"; + case 8: + return "Throttle Limit Exceeded (volume controls)"; + case 100: + return "Value is incorrect (out of range) for this tag (for example " + "using a value outside defined range of integer) "; + case 101: + return "Incorrect data format for value (for example using ASCII " + "character outside 32-126 in string field)"; + case 102: + return "Rejected due to Kill Switch"; + case 103: + return "Rejected due to Risk Management API"; + case 104: + return "Rejected due to Globex Credit Controls"; + case 105: + return "Not Authorized to trade Deliverable Swap Futures"; + case 106: + return "Not Authorized to trade Interest Rate Swap Futures"; + case 107: + return "Rejected due to Inline Credit Controls"; + case 108: + return "Invalid PartyDetailsListReqID (reusing already existing " + "PartyDetailsListReqID while creating Party Details Definition " + "Request)"; + case 109: + return "Incoming message could not be decoded. (Check schema version)"; + case 110: + return "Same repeating group entry appears more than once"; + case 111: + return "Exceeded maximum number of allowable Party Details Definition " + "Requests"; + case 112: + return "Technical Error in Registering Party Details"; + case 113: + return "Rejected due to Cross Venue Risk"; + case 114: + return "Order Status Not Available"; + case 115: + return "Enum Not Supported"; + case 116: + return "Order Status Not Found"; + case 117: + return "Mass Order Status Cannot be Completed"; + case 118: + return "Exceeded Maximum Number of Allowable RequestingPartyID's in " + "Party Details List Request"; + case 119: + return "Duplicate Order Threshold Exceeded"; + case 120: + return "On-Demand Message Rejected Due to Preceding Party Details " + "Definition Request Being Rejected"; + case 121: + return "Message Rejected Since PartyDetailsListReqID Does Not Match with " + "Immediately Preceding Party Details Definition Request sent to " + "MSGW when using On-demand administrative information"; + case 122: + return "Party Details Definition Request sent to MSGW Being Rejected Due " + "to Corresponding Business Message Being Rejected"; + case 123: + return "Another Message Sent in Between Party Details Definition Request " + "and Business Message when using On-demand administrative " + "information"; + case 124: + return "Cannot Have More Than One In-Flight Mass Order Status Request in " + "Progress"; + case 125: + return "Exceeded Maximum Number of In-Flight Order Status Requests"; + case 126: + return "Cannot Have More Than One In-Flight Party Details List Request " + "in Progress"; + case 127: + return "Party Details List Request is Missing Requesting Party ID and " + "Party ID"; + case 128: + return "Party Details List Request cannot contain both RequestingPartyID " + "and PartyID"; + case 129: + return "Party Details Definition Request Being Rejected Since Another " + "Message was sent in Between On-Demand Message"; + case 130: + return "Buy Side Firm ID Does Not Match Sell Side Firm ID in New Order " + "Cross"; + case 131: + return "Message Type Not Supported on Backup Instance"; + case 132: + return "New Order Cross Does Not Contain Buy Side Followed by Sell Side"; + } + return "Unknown or invalid business reject reason."; +} + +const char *translate_negotiation_reject(int reason) { + // https://www.cmegroup.com/confluence/display/EPICSANDBOX/Negotiation+Reject + // 01/13/2020 + switch (reason) { + case 0: + return "HMACNotAuthenticated: failed authentication because identity is " + "not recognized"; + case 1: + return "HMACNotAvailable: HMAC component is not responding (5sec)"; + case 2: + return "InvalidUUID: UUID is not greater than the one last used or value " + "sent by the client is out of acceptable range (MIN, MAX)"; + case 3: + return "InvalidTimestamp: Timestamp is not greater than the one last " + "used or value sent by the client is out of acceptable range " + "(MIN, MAX)"; + case 4: + return "RequiredHMACSignatureMissing: empty bytes in HMACSignature field"; + case 5: + return "RequiredAccessKeyIDMissing: empty bytes in AccessKeyID field"; + case 6: + return "RequiredSessionMissing: empty bytes in Session field"; + case 7: + return "RequiredFirmMissing: empty bytes in Firm field"; + case 8: + return "RequiredUUIDMisssing: null value in UUID field"; + case 9: + return "RequiredRequestTimestampMissing: null value in RequestTimestamp " + "field"; + case 10: + return "SessionBlocked: session and firm are not authorized for this " + "port"; + case 12: + return "InvalidAccessKeyID: contains non-printable ASCII character"; + case 13: + return "InvalidSession: contains non-printable ASCII character"; + case 14: + return "InvalidFirm: contains non-printable ASCII character"; + case 15: + return "Volume Controls - exceeding TPS limit as defined for volume " + "controls (reject action)"; + case 16: + return "SplitMessageRejected - Messages queued due to split message " + "penalty being rejected because of logout or disconnect"; + case 17: + return "SplitMessageQueue - Reached threshold of messages queued due to " + "split message penalty"; + case 27: + return "DesignatedBackup - Using Designated backup before designated " + "primary not allowed"; + } + return "Unknown or invalid Negotiate reject reason."; +} + +const char *translate_establish_reject(int reason) { + switch (reason) { + case 0: + return "HMACNotAuthenticated: failed authentication because identity is " + "not recognized"; + case 1: + return "HMACNotAvailable: HMAC component is not responding (5sec)"; + case 2: + return "InvalidUUID: UUID is not greater than the one last used or value " + "sent by the client is out of acceptable range (MIN, MAX)"; + case 3: + return "InvalidTimestamp: Timestamp is not greater than the one last " + "used or value sent by the client is out of acceptable range " + "(MIN, MAX)"; + case 4: + return "RequiredHMACSignatureMissing: empty bytes in HMACSignature field"; + case 5: + return "RequiredAccessKeyIDMissing: empty bytes in AccessKeyID field"; + case 6: + return "RequiredSessionMissing: empty bytes in Session field"; + case 7: + return "RequiredFirmMissing: empty bytes in Firm field"; + case 8: + return "RequiredUUIDMisssing: null value in UUID field"; + case 9: + return "RequiredRequestTimestampMissing: null value in RequestTimestamp " + "field"; + case 10: + return "SessionBlocked: session and firm are not authorized for this " + "port"; + case 11: + return "InvalidKeepAliveInterval: value is out of acceptable range (MIN, " + "MAX)"; + case 12: + return "InvalidAccessKeyID: contains non-printable ASCII character"; + case 13: + return "InvalidSession: contains non-printable ASCII character"; + case 14: + return "InvalidFirm: contains non-printable ASCII character"; + case 15: + return "Volume Controls - exceeding TPS limit as defined for volume " + "controls (reject action)"; + case 16: + return "SplitMessageRejected - Messages queued due to split message " + "penalty being rejected because of logout or disconnect"; + case 17: + return "SplitMessageQueue - Reached threshold of messages queued due to " + "split message penalty"; + case 18: + return "RequiredTradingSystemNameMissing: empty bytes in " + "TradingSystemName"; + case 19: + return "RequiredTradingSystemVersionMissing: empty bytes in " + "TradingSystemVersion"; + case 20: + return "RequiredTradingSystemVendorMissing: empty bytes in " + "TradingSystemVendor"; + case 21: + return "RequiredKeepAliveIntervalMissing: null value in " + "KeepAliveInterval field"; + case 22: + return "RequiredNextSeqNoMissing: empty bytes in NextSeqNo field"; + case 23: + return "InvalidTradingSystemName: contains non-prinatable ASCII " + "character"; + case 24: + return "InvalidTradingSystemVersion: contains non-prinatable ASCII " + "character"; + case 25: + return "InvalidTradingSystemVendor: contains non-prinatable ASCII " + "character"; + case 26: + return "DesignatedBackup - Using Designated backup before designated " + "primary not allowed"; + case 27: + return "DesignatedBackup - Using Designated backup before designated " + "primary not allowed"; + } + return "Unknown or invalid Establish reject reason."; +} + +const char *translate_terminate(int reason) { + switch (reason) { + case 0: + return "Finished: session is being terminated without finalization"; + + case 2: + return "Unnegotiated: Sending any message when session has not been " + "Negotiated "; + + case 3: + return "NotEstablished: Sending any message (except Negotiate) when " + "session has not been established"; + + case 4: + return "AlreadyNegotiated: NegotiationResponse was already sent; " + "Negotiate was redundant"; + + case 5: + return "NegotiationInProgress: Previous Negotiate still being processed; " + "Wait for NegotiationResponse or timeout"; + + case 6: + return "AlreadyEstablished: EstablishmentAck was already sent; Establish " + "was redundant"; + + case 7: + return "EstablishInProgress: Previous Establish still being processed; " + "Wait for EstablishmentAck or timeout"; + + case 8: + return "CMEAdministeredPortClosure: due to invalid number of " + "Negotiate/Establish attempts being exceeded"; + + case 9: + return "Volume Controls - exceeding TPS limit as defined for volume " + "controls (logout action)"; + + case 10: + return "InvalidNextSeqNo - value is not greater than the one last used " + "for same UUID or value sent by the client is out of acceptable " + "range (MIN, MAX)"; + + case 11: + return "InvalidMsgSeqNo - value is lower than the last one used for the " + "same UUID or value is not initialized to 1 at the beginning of " + "the week or value sent by the client is out of acceptable range " + "(MIN, MAX)"; + + case 12: + return "InvalidLastSeqNo - value is lower than the last one used for the " + "same UUID or value sent by the client is out of acceptable range " + "(MIN, MAX)"; + + case 13: + return "InvalidUUID: UUID value does not match current UUID or value " + "sent by the client is out of acceptable range (MIN, MAX)"; + + case 14: + return "InvalidTimestamp: Timestamp value does not match with " + "RequestTimestamp sent by CME or value sent by the client is out " + "of acceptable range (MIN, MAX)"; + + case 15: + return "RequiredUUIDMisssing: null value in UUID field"; + + case 16: + return "RequiredRequestTimestampMissing: null value in RequestTimestamp " + "field"; + + case 17: + return "RequiredCodeMisssing: null value in Code field"; + + case 18: + return "InvalidSOFH: Invalid message length or invalid encoding type " + "specified"; + + case 19: + return "DecodingError: Incoming message could not be decoded"; + + case 20: + return "KeepAliveIntervalLapsed: KeepAliveInterval has lapsed without " + "any response so terminating session"; + + case 21: + return "RequiredNextSeqNoMissing: null value in NextSeqNo field"; + + case 22: + return "RequiredKeepAliveIntervalLapsedMissing: null value in " + "KeepAliveIntervalLapsed field"; + + case 23: + return "Non-Negotiate/Establish message received when not " + "Negotiated/Established"; + + case 24: + return "TerminateInProgress: Previous Terminate still being processed; " + "Wait for Terminate or timeout"; + + case 25: + return "Other: any other error condition not mentioned above"; + + case 26: + return "DisconnectFromPrimary: Backup session will be terminated as " + "well}"; + default: + return "Unknown error"; + } +} + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/ilink3/ILink3Utils.h b/src/lib/orderman/actors/ilink3/ILink3Utils.h new file mode 100644 index 000000000..88a742976 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/ILink3Utils.h @@ -0,0 +1,51 @@ +#pragma once + +#include "lib/domain_model/common.h" +#include "lib/domain_model/Security.pb.h" +#include "lib/api/services/OrderService.pb.h" +#include "lib/orderman/orderman_utils/orderman_common.h" + +#include "generated/SideReq.h" +#include "generated/OrderTypeReq.h" +#include "generated/OrderType.h" +#include "generated/TimeInForce.h" +#include "generated/ManualOrdInd.h" +#include "generated/ManualOrdIndReq.h" +#include "generated/ClearingAcctType.h" +#include "generated/SMPI.h" +#include "generated/CustOrderCapacity.h" + +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +iLinkBinary::SideReq::Value map_side(api::Side side); +api::Side map_side(iLinkBinary::SideReq::Value side); + +inline int64_t to_price9(Price p) { + return std::round(p.value() * 1E9); +} + +iLinkBinary::OrderTypeReq::Value map_order_type(api::orderman::NativeOrderType ot); +api::orderman::NativeOrderType map_order_type(iLinkBinary::OrderType::Value); + +iLinkBinary::TimeInForce::Value map_time_in_force(api::orderman::TimeInForce); +api::orderman::TimeInForce map_time_in_force(iLinkBinary::TimeInForce::Value); + +iLinkBinary::ManualOrdIndReq::Value map_manual_order_indicator(api::orderman::ManualOrderIndicator moi); +api::orderman::ManualOrderIndicator map_manual_order_indicator(iLinkBinary::ManualOrdIndReq::Value moi); + +iLinkBinary::ClearingAcctType::Value map_customer_or_firm(api::orderman::CustomerOrFirm c); + +iLinkBinary::SMPI::Value map_smp_instruction(api::orderman::SelfMatchPreventionInstruction smpi); +iLinkBinary::CustOrderCapacity::Value map_cust_cti(api::orderman::CTICode code); + +const char* translate_business_reject_reason(int reason) ; +const char* translate_negotiation_reject(int reason) ; +const char* translate_establish_reject(int reason) ; +const char* translate_terminate(int reason) ; + + +}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/RawMsg.h b/src/lib/orderman/actors/ilink3/RawMsg.h new file mode 100644 index 000000000..988d1c559 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/RawMsg.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { +enum class RawMessageDirection {INCOMING, OUTGOING}; +struct RawMessageData { + std::string json; + std::string binary; +}; +using RawMsg = std::function; +}}} diff --git a/src/lib/orderman/actors/ilink3/SessionStore.cpp b/src/lib/orderman/actors/ilink3/SessionStore.cpp new file mode 100644 index 000000000..0b5aaf1b2 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/SessionStore.cpp @@ -0,0 +1,188 @@ +#include "SessionStore.h" +#include "lib/jetfix/store/session_name.h" +#include "lib/orderman/actors/ilink3/IL3GW.h" +#include "lib/orderman/actors/ilink3/IL3SecDB.h" +#include "lib/orderman/orderman_utils/ExecutionReport.h" +#include "lib/utils/base64.hpp" +#include "lib/utils/bts_chrono.h" +#include "lib/utils/file_utils.h" +#include "lib/utils/thread_manager.h" + +#include +#include +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { + +using Action = std::function; + +static std::string base_store_path(std::string base_path, + std::string const &connection_name, + std::string const &session_name) { + if (base_path.empty()) + base_path = os::bts_data_path(); + boost::filesystem::path result = utils::normalize_data_path(base_path); + result /= "ilink3"; + result /= connection_name; + result /= session_name; + if (!boost::filesystem::exists(result)) + bts_assert(boost::filesystem::create_directories(result)); + return result.string(); +} + +static std::string raw_msg_log_path(std::string const &store_path) { + boost::filesystem::path result = store_path; + result /= "log"; + return result.string(); +} + +static std::string session_path(std::string const &store_path) { + boost::filesystem::path result = store_path; + result /= "seqnum"; + return result.string(); +} + +static std::vector +load_replay(IL3SecDB &db, config::JetFIX::Connection const *cfg, + std::string const &path) { + + IL3Parser parser(cfg, &db); + + std::vector result; + if (boost::filesystem::exists(path)) { + + std::ifstream f(path); + nlohmann::json j; + for (;;) { + while (!f.eof() && f.get() != '{') + ; + if (f.eof()) + break; + else { + f.unget(); + f >> j; + if (j["direction"] == "<") { + auto ts = datetime::parse_FIX_timestamp(j["time"]); + if (!datetime::is_at_least_secs_old(ts, + cfg->seconds_to_replay())) { + + auto msg_bytes = websocketpp::base64_decode(j["msg_sbe"]); + if (msg_bytes.size()) { + auto maybe_ex_rep = parser.try_parse_exe_report(msg_bytes); + if (maybe_ex_rep) + result.push_back(maybe_ex_rep.value()); + } + } + } + } + } + } + return result; +} + +static void save_raw_msg(std::ofstream &out, RawMessageDirection d, size_t sn, + RawMessageData const &msg) { + nlohmann::json j; + j["direction"] = d == RawMessageDirection::INCOMING ? "<" : ">"; + j["sn"] = sn; + j["time"] = datetime::FIX_timestamp(datetime::now()); + j["msg_sbe"] = websocketpp::base64_encode(msg.binary); + try { + j["msg_json"] = nlohmann::json::parse(msg.json); + } catch (...) { + LOG(iLink3, Error, "Skipping troublesome json encoded message: {}", + msg.json); + j["msg_json"] = nlohmann::json{}; + } + out << j << std::endl; + out.flush(); +} + +void save_session(std::string const &path, Session const &session) { + std::ofstream f(path); + f << session.uuid << " " << session.to_cme << " " << session.from_cme + << std::endl; +} + +Session load_session(jetfix::SessionName const &sn, std::string const &path) { + auto result = Session{sn.as_uint64_t, 0, 0}; + if (boost::filesystem::exists(path)) { + std::ifstream f(path); + uint64_t dummy; + f >> dummy >> result.to_cme >> result.from_cme; + } else + save_session(path, result); + return result; +} + +struct SessionStore::PImpl { + PImpl(IL3SecDB &db, jetfix::SessionName const &session_name, + config::JetFIX::Connection const *cfg, std::string const &base_path) + : cfg(cfg), store_path(base_store_path(base_path, cfg->name(), + session_name.as_string)), + replay_messages(load_replay(db, cfg, raw_msg_log_path(store_path))), + starting_session_descriptor( + load_session(session_name, session_path(store_path))), + raw_msg_store() { + raw_msg_store.open(raw_msg_log_path(store_path), std::ofstream::app); + } + + const config::JetFIX::Connection *cfg; + const std::string store_path; + const std::vector replay_messages; + const Session starting_session_descriptor; + std::atomic done = false; + tbb::concurrent_queue event_queue; + std::thread storage_thread; + std::ofstream raw_msg_store; +}; + +SessionStore::SessionStore(IL3SecDB &db, + jetfix::SessionName const &session_name, + config::JetFIX::Connection const *cfg, + std::string base_path) + : me(new PImpl(db, session_name, cfg, base_path)) { + me->storage_thread = threading::make_thread_from_function( + "il3_store", [this]() { do_work(); }); +} + +std::vector const &SessionStore::replay() const { + return me->replay_messages; +} + +Session SessionStore::starting_session_descriptor() const { + return me->starting_session_descriptor; +} + +void SessionStore::async_update_session(Session const &s) { + me->event_queue.push( + Action{[this, s]() { save_session(session_path(me->store_path), s); }}); +} + +void SessionStore::async_store_raw_msg(RawMessageDirection d, size_t sn, + RawMsg const &ms) { + me->event_queue.push(Action{ + [this, d, sn, ms]() { save_raw_msg(me->raw_msg_store, d, sn, ms()); }}); +} + +void SessionStore::do_work() { + while (!me->done) { + Action a; + if (me->event_queue.try_pop(a)) + a(); + else + std::this_thread::sleep_for(100ms); + } +} + +SessionStore::~SessionStore() { + me->done = true; + me->storage_thread.join(); +} + +} // namespace ilink3 +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/actors/ilink3/SessionStore.h b/src/lib/orderman/actors/ilink3/SessionStore.h new file mode 100644 index 000000000..627eab4d9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/SessionStore.h @@ -0,0 +1,41 @@ +#pragma once + +#include +#include +#include +#include "lib/config/protos/jetfix.pb.h" +#include "RawMsg.h" + +// fwds +namespace bts { +namespace jetfix {struct SessionName;} +namespace orderman {class ExecutionReport;} +} + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct Session; +class IL3SecDB; + +class SessionStore { +public: + SessionStore(IL3SecDB &, + jetfix::SessionName const&session_name, + config::JetFIX::Connection const*, + std::string base_path=""); + ~SessionStore() ; + + Session starting_session_descriptor() const; + std::vector const &replay() const; + + void async_update_session(Session const&) ; + void async_store_raw_msg(RawMessageDirection, size_t sn,RawMsg const&); +private: + void do_work(); + struct PImpl; + std::unique_ptr me; +}; + +}}} diff --git a/src/lib/orderman/actors/ilink3/TimeKeeper.h b/src/lib/orderman/actors/ilink3/TimeKeeper.h new file mode 100644 index 000000000..4a08cd95d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/TimeKeeper.h @@ -0,0 +1,25 @@ +#pragma once +#include "lib/utils/datetime.h" +#include "lib/utils/TimeStamp.h" + +namespace bts { +namespace orderman { +namespace ilink3 { + +struct TimeKeeper { + uint64_t unix_time; + utils::TimeStamp start; + + TimeKeeper() : + unix_time(datetime::unix_nano_now()), + start(utils::TimeStamp::now()) + {} + + uint64_t now() const { + auto now = utils::TimeStamp::now(); + auto delta = now - start; + return unix_time + delta.nanoseconds(); + } +}; + +}}} //namespace diff --git a/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h b/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h new file mode 100644 index 000000000..bf8aba682 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_AVGPXIND_H_ +#define _ILINKBINARY_AVGPXIND_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum AvgPxInd [E103]"); + } + + static const char* c_str(const AvgPxInd::Value value) + { + switch (value) + { + case NoAveragePricing: return "NoAveragePricing"; + case TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID: return "TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID"; + case TradeispartofaNotionalValueAveragePriceGroup: return "TradeispartofaNotionalValueAveragePriceGroup"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum AvgPxInd [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, AvgPxInd::Value m) + { + return os << AvgPxInd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h b/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h new file mode 100644 index 000000000..b8fffabec --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BOOLEANFLAG_H_ +#define _ILINKBINARY_BOOLEANFLAG_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class BooleanFlag +{ +public: + enum Value + { + False = (std::uint8_t)0, + True = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum BooleanFlag [E103]"); + } + + static const char* c_str(const BooleanFlag::Value value) + { + switch (value) + { + case False: return "False"; + case True: return "True"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum BooleanFlag [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, BooleanFlag::Value m) + { + return os << BooleanFlag::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h b/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h new file mode 100644 index 000000000..987adc0e5 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BOOLEANNULL_H_ +#define _ILINKBINARY_BOOLEANNULL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class BooleanNULL +{ +public: + enum Value + { + False = (std::uint8_t)0, + True = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum BooleanNULL [E103]"); + } + + static const char* c_str(const BooleanNULL::Value value) + { + switch (value) + { + case False: return "False"; + case True: return "True"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum BooleanNULL [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, BooleanNULL::Value m) + { + return os << BooleanNULL::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h b/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h new file mode 100644 index 000000000..0d4772623 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h @@ -0,0 +1,2016 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BUSINESSREJECT521_H_ +#define _ILINKBINARY_BUSINESSREJECT521_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class BusinessReject521 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + BusinessReject521() = default; + + BusinessReject521( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + BusinessReject521(char *buffer, const std::uint64_t bufferLength) : + BusinessReject521(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + BusinessReject521( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + BusinessReject521(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)330; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)521; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "j"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + BusinessReject521 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = BusinessReject521(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + BusinessReject521 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = BusinessReject521( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + BusinessReject521 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = BusinessReject521(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + BusinessReject521 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + BusinessReject521 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + BusinessReject521 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 288, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + BusinessReject521 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 288, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + BusinessReject521 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 296, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * BusinessRejectRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t businessRejectRefIDId() SBE_NOEXCEPT + { + return 379; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t businessRejectRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool businessRejectRefIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= businessRejectRefIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t businessRejectRefIDEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t businessRejectRefIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t businessRejectRefID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 304, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + BusinessReject521 &businessRejectRefID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 304, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 312 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 312 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 312, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * RefSeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t refSeqNumId() SBE_NOEXCEPT + { + return 45; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refSeqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refSeqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refSeqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refSeqNumEncodingOffset() SBE_NOEXCEPT + { + return 317; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t refSeqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t refSeqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 317, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + BusinessReject521 &refSeqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 317, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * RefTagIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t refTagIDId() SBE_NOEXCEPT + { + return 371; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refTagIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refTagIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refTagIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refTagIDEncodingOffset() SBE_NOEXCEPT + { + return 321; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t refTagIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t refTagID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 321, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + BusinessReject521 &refTagID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 321, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * BusinessRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonId() SBE_NOEXCEPT + { + return 380; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t businessRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool businessRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= businessRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t businessRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t businessRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t businessRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 323, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + BusinessReject521 &businessRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 323, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * RefMsgTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t refMsgTypeId() SBE_NOEXCEPT + { + return 372; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refMsgTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refMsgTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refMsgTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refMsgTypeEncodingOffset() SBE_NOEXCEPT + { + return 325; + } + + static SBE_CONSTEXPR char refMsgTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char refMsgTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char refMsgTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t refMsgTypeEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t refMsgTypeLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *refMsgType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 325; + } + + SBE_NODISCARD char *refMsgType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 325; + } + + SBE_NODISCARD char refMsgType(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for refMsgType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 325 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &refMsgType(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for refMsgType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 325 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRefMsgType(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getRefMsgType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 325, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putRefMsgType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 325, src, sizeof(char) * 2); + return *this; + } + + BusinessReject521 &putRefMsgType( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 325, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 326, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getRefMsgTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 325; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRefMsgTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRefMsgTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getRefMsgTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 325; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putRefMsgType(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 325 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putRefMsgType(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 325 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 327; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + BusinessReject521 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 327, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 328; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdInd::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 328, sizeof(std::uint8_t)); + return ManualOrdInd::get((val)); + } + + BusinessReject521 &manualOrderIndicator(const ManualOrdInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 328, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + BusinessReject521 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, BusinessReject521 _writer) +{ + BusinessReject521 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "BusinessReject521", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("BusinessRejectRefID": )"; + builder << +writer.businessRejectRefID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("RefSeqNum": )"; + builder << +writer.refSeqNum(); + + builder << ", "; + builder << R"("RefTagID": )"; + builder << +writer.refTagID(); + + builder << ", "; + builder << R"("BusinessRejectReason": )"; + builder << +writer.businessRejectReason(); + + builder << ", "; + builder << R"("RefMsgType": )"; + builder << '"' << + writer.getRefMsgTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h b/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h new file mode 100644 index 000000000..23c6ef05b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CLEARINGACCTTYPE_H_ +#define _ILINKBINARY_CLEARINGACCTTYPE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ClearingAcctType +{ +public: + enum Value + { + Customer = (std::uint8_t)0, + Firm = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum ClearingAcctType [E103]"); + } + + static const char* c_str(const ClearingAcctType::Value value) + { + switch (value) + { + case Customer: return "Customer"; + case Firm: return "Firm"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ClearingAcctType [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ClearingAcctType::Value m) + { + return os << ClearingAcctType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h b/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h new file mode 100644 index 000000000..c01c4fba4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CMTAGIVEUPCD_H_ +#define _ILINKBINARY_CMTAGIVEUPCD_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class CmtaGiveUpCD +{ +public: + enum Value + { + GiveUp = (char)71, + SGXoffset = (char)83, + NULL_VALUE = (char)0 + }; + + static CmtaGiveUpCD::Value get(const char value) + { + switch (value) + { + case 71: return GiveUp; + case 83: return SGXoffset; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]"); + } + + static const char* c_str(const CmtaGiveUpCD::Value value) + { + switch (value) + { + case GiveUp: return "GiveUp"; + case SGXoffset: return "SGXoffset"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, CmtaGiveUpCD::Value m) + { + return os << CmtaGiveUpCD::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h b/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h new file mode 100644 index 000000000..bea3198a7 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h @@ -0,0 +1,153 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CUSTORDHANDLINST_H_ +#define _ILINKBINARY_CUSTORDHANDLINST_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]"); + } + + static const char* c_str(const CustOrdHandlInst::Value value) + { + switch (value) + { + case FCMprovidedscreen: return "FCMprovidedscreen"; + case Otherprovidedscreen: return "Otherprovidedscreen"; + case FCMAPIorFIX: return "FCMAPIorFIX"; + case AlgoEngine: return "AlgoEngine"; + case DeskElectronic: return "DeskElectronic"; + case ClientElectronic: return "ClientElectronic"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, CustOrdHandlInst::Value m) + { + return os << CustOrdHandlInst::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h b/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h new file mode 100644 index 000000000..7561fa2bc --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CUSTORDERCAPACITY_H_ +#define _ILINKBINARY_CUSTORDERCAPACITY_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum CustOrderCapacity [E103]"); + } + + static const char* c_str(const CustOrderCapacity::Value value) + { + switch (value) + { + case Membertradingfortheirownaccount: return "Membertradingfortheirownaccount"; + case Clearingfirmtradingforitsproprietaryaccount: return "Clearingfirmtradingforitsproprietaryaccount"; + case Membertradingforanothermember: return "Membertradingforanothermember"; + case Allother: return "Allother"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CustOrderCapacity [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, CustOrderCapacity::Value m) + { + return os << CustOrderCapacity::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/DATA.h b/src/lib/orderman/actors/ilink3/generated/DATA.h new file mode 100644 index 000000000..40887a013 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/DATA.h @@ -0,0 +1,348 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DATA_H_ +#define _ILINKBINARY_DATA_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class DATA +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + DATA() = default; + + DATA( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + -1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + DATA( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + DATA(buffer, 0, bufferLength, actingVersion) + { + } + + DATA( + char *buffer, + const std::uint64_t bufferLength) : + DATA(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + DATA &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = DATA(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lengthId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t lengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t lengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t lengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t lengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t length() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + DATA &length(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * varDataMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t varDataId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t varDataSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool varDataInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= varDataSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t varDataEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR char varDataNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char varDataMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char varDataMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t varDataEncodingLength() SBE_NOEXCEPT + { + return -1; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, DATA writer) +{ + builder << '{'; + builder << R"("length": )"; + builder << +writer.length(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/DKReason.h b/src/lib/orderman/actors/ilink3/generated/DKReason.h new file mode 100644 index 000000000..00daea95b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/DKReason.h @@ -0,0 +1,159 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DKREASON_H_ +#define _ILINKBINARY_DKREASON_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum DKReason [E103]"); + } + + static const char* c_str(const DKReason::Value value) + { + switch (value) + { + case UnknownSecurity: return "UnknownSecurity"; + case WrongSide: return "WrongSide"; + case QuantityExceedsOrder: return "QuantityExceedsOrder"; + case NoMatchingOrder: return "NoMatchingOrder"; + case PriceExceedsLimit: return "PriceExceedsLimit"; + case CalculationDifference: return "CalculationDifference"; + case NoMatchingExecutionReport: return "NoMatchingExecutionReport"; + case Other: return "Other"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum DKReason [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, DKReason::Value m) + { + return os << DKReason::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h b/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h new file mode 100644 index 000000000..e1562b9eb --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h @@ -0,0 +1,366 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DECIMAL32NULL_H_ +#define _ILINKBINARY_DECIMAL32NULL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class Decimal32NULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Decimal32NULL() = default; + + Decimal32NULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + Decimal32NULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal32NULL(buffer, 0, bufferLength, actingVersion) + { + } + + Decimal32NULL( + char *buffer, + const std::uint64_t bufferLength) : + Decimal32NULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + Decimal32NULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal32NULL(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t mantissaNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t mantissaMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t mantissaMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mantissa() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Decimal32NULL &mantissa(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int8_t)); + return (val); + } + + Decimal32NULL &exponent(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Decimal32NULL writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << ", "; + builder << R"("exponent": )"; + builder << +writer.exponent(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h b/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h new file mode 100644 index 000000000..52469f89c --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h @@ -0,0 +1,366 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DECIMAL64NULL_H_ +#define _ILINKBINARY_DECIMAL64NULL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class Decimal64NULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Decimal64NULL() = default; + + Decimal64NULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 9) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + Decimal64NULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal64NULL(buffer, 0, bufferLength, actingVersion) + { + } + + Decimal64NULL( + char *buffer, + const std::uint64_t bufferLength) : + Decimal64NULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + Decimal64NULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal64NULL(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Decimal64NULL &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int8_t)); + return (val); + } + + Decimal64NULL &exponent(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::int8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Decimal64NULL writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << ", "; + builder << R"("exponent": )"; + builder << +writer.exponent(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Establish503.h b/src/lib/orderman/actors/ilink3/generated/Establish503.h new file mode 100644 index 000000000..5071f79ed --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Establish503.h @@ -0,0 +1,2491 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISH503_H_ +#define _ILINKBINARY_ESTABLISH503_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class Establish503 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Establish503() = default; + + Establish503( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + Establish503(char *buffer, const std::uint64_t bufferLength) : + Establish503(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Establish503( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Establish503(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)503; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Establish"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Establish503 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Establish503(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Establish503 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = Establish503( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Establish503 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Establish503(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + Establish503 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hMACVersionId() SBE_NOEXCEPT + { + return 39003; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACVersionEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t hMACVersionLength() SBE_NOEXCEPT + { + return 13; + } + + 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 }; + + 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 }; + + return (char)hMACVersionValues[index]; + } + + std::uint64_t getHMACVersion(char *dst, const std::uint64_t length) const + { + 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(bytesToCopy)); + return bytesToCopy; + } + + std::string getHMACVersionAsString() const + { + static const std::uint8_t HMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return std::string((const char *)HMACVersionValues, 13); + } + + std::string getHMACVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACVersionAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hMACSignatureId() SBE_NOEXCEPT + { + return 39005; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACSignatureSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACSignatureInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACSignatureSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACSignatureEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t hMACSignatureLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD const char *hMACSignature() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *hMACSignature() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char hMACSignature(const std::uint64_t index) const + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &hMACSignature(const std::uint64_t index, const char value) + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getHMACSignature(char *const dst, const std::uint64_t length) const + { + if (length > 32) + { + throw std::runtime_error("length too large for getHMACSignature [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putHMACSignature(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 32); + return *this; + } + + SBE_NODISCARD std::string getHMACSignatureAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getHMACSignatureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACSignatureAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putHMACSignature(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Establish503 &putHMACSignature(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t accessKeyIDId() SBE_NOEXCEPT + { + return 39004; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t accessKeyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool accessKeyIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= accessKeyIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t accessKeyIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t accessKeyIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *accessKeyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char *accessKeyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char accessKeyID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 32 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &accessKeyID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 32 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAccessKeyID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAccessKeyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putAccessKeyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 32, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getAccessKeyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAccessKeyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAccessKeyIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putAccessKeyID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #else + Establish503 &putAccessKeyID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemNameId() SBE_NOEXCEPT + { + return 1603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemNameSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemNameInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemNameSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemNameEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char tradingSystemNameNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemNameMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemNameMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemNameEncodingLength() SBE_NOEXCEPT + { + return 30; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemNameLength() SBE_NOEXCEPT + { + return 30; + } + + SBE_NODISCARD const char *tradingSystemName() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *tradingSystemName() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char tradingSystemName(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for tradingSystemName [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemName(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for tradingSystemName [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemName(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getTradingSystemName [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemName(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 30); + return *this; + } + + SBE_NODISCARD std::string getTradingSystemNameAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemNameAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemNameAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTradingSystemNameAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemName(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemName(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemVersionId() SBE_NOEXCEPT + { + return 1604; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemVersionEncodingOffset() SBE_NOEXCEPT + { + return 82; + } + + static SBE_CONSTEXPR char tradingSystemVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemVersionEncodingLength() SBE_NOEXCEPT + { + return 10; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemVersionLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *tradingSystemVersion() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 82; + } + + SBE_NODISCARD char *tradingSystemVersion() SBE_NOEXCEPT + { + return m_buffer + m_offset + 82; + } + + SBE_NODISCARD char tradingSystemVersion(const std::uint64_t index) const + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVersion [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 82 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemVersion(const std::uint64_t index, const char value) + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVersion [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 82 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemVersion(char *const dst, const std::uint64_t length) const + { + if (length > 10) + { + throw std::runtime_error("length too large for getTradingSystemVersion [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 82, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemVersion(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 82, src, sizeof(char) * 10); + return *this; + } + + SBE_NODISCARD std::string getTradingSystemVersionAsString() const + { + const char *buffer = m_buffer + m_offset + 82; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemVersionAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTradingSystemVersionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 82; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemVersion(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 82 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemVersion(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 82 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemVendorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemVendorId() SBE_NOEXCEPT + { + return 1605; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemVendorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemVendorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemVendorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemVendorEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR char tradingSystemVendorNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemVendorMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemVendorMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemVendorEncodingLength() SBE_NOEXCEPT + { + return 10; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemVendorLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *tradingSystemVendor() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char *tradingSystemVendor() SBE_NOEXCEPT + { + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char tradingSystemVendor(const std::uint64_t index) const + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVendor [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 92 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemVendor(const std::uint64_t index, const char value) + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVendor [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 92 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemVendor(char *const dst, const std::uint64_t length) const + { + if (length > 10) + { + throw std::runtime_error("length too large for getTradingSystemVendor [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemVendor(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 92, src, sizeof(char) * 10); + return *this; + } + + SBE_NODISCARD std::string getTradingSystemVendorAsString() const + { + const char *buffer = m_buffer + m_offset + 92; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemVendorAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemVendorAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTradingSystemVendorAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 92; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemVendor(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemVendor(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 102; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Establish503 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 110; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Establish503 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 118; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 118, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Establish503 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 118, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sessionId() SBE_NOEXCEPT + { + return 39006; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sessionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sessionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sessionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sessionEncodingOffset() SBE_NOEXCEPT + { + return 122; + } + + static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sessionLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *session() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char *session() SBE_NOEXCEPT + { + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char session(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 122 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &session(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 122 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSession(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSession [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putSession(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 122, src, sizeof(char) * 3); + return *this; + } + + Establish503 &putSession( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 122, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 123, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 124, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getSessionAsString() const + { + const char *buffer = m_buffer + m_offset + 122; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSessionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSessionAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSessionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 122; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putSession(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #else + Establish503 &putSession(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t firmId() SBE_NOEXCEPT + { + return 39007; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t firmSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool firmInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= firmSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t firmEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + + static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t firmLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *firm() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 125; + } + + SBE_NODISCARD char *firm() SBE_NOEXCEPT + { + return m_buffer + m_offset + 125; + } + + SBE_NODISCARD char firm(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 125 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &firm(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 125 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFirm(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getFirm [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 125, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putFirm(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 125, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getFirmAsString() const + { + const char *buffer = m_buffer + m_offset + 125; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFirmAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFirmAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFirmAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 125; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putFirm(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 125 + start] = 0; + } + + return *this; + } + #else + Establish503 &putFirm(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 125 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalId() SBE_NOEXCEPT + { + return 39014; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingOffset() SBE_NOEXCEPT + { + return 130; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t keepAliveInterval() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 130, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Establish503 &keepAliveInterval(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 130, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + Establish503 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + if (length != std::uint16_t(0)) + { + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + } + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + Establish503 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + + #if __cplusplus >= 201703L + Establish503 &putCredentials(const std::string_view str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + #endif + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Establish503 _writer) +{ + Establish503 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Establish503", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("HMACSignature": )"; + builder << '"' << + writer.getHMACSignatureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AccessKeyID": )"; + builder << '"' << + writer.getAccessKeyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemName": )"; + builder << '"' << + writer.getTradingSystemNameAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemVersion": )"; + builder << '"' << + writer.getTradingSystemVersionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemVendor": )"; + builder << '"' << + writer.getTradingSystemVendorAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("Session": )"; + builder << '"' << + writer.getSessionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Firm": )"; + builder << '"' << + writer.getFirmAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("KeepAliveInterval": )"; + builder << +writer.keepAliveInterval(); + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ + skipCredentials(); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += credentialsHeaderLength(); + if (CredentialsLength > 65534) + { + throw std::runtime_error("CredentialsLength too long for length type [E109]"); + } + length += CredentialsLength; + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h b/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h new file mode 100644 index 000000000..6ee8796b4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h @@ -0,0 +1,1025 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISHMENTACK504_H_ +#define _ILINKBINARY_ESTABLISHMENTACK504_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class EstablishmentAck504 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + EstablishmentAck504() = default; + + EstablishmentAck504( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + EstablishmentAck504(char *buffer, const std::uint64_t bufferLength) : + EstablishmentAck504(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + EstablishmentAck504( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + EstablishmentAck504(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)504; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "EstablishmentAck"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + EstablishmentAck504 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = EstablishmentAck504(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + EstablishmentAck504 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = EstablishmentAck504( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + EstablishmentAck504 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = EstablishmentAck504(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + EstablishmentAck504 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentAck504 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentAck504 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentAck504 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t previousSeqNoId() SBE_NOEXCEPT + { + return 39021; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t previousSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentAck504 &previousSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t previousUUIDId() SBE_NOEXCEPT + { + return 39015; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousUUIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t previousUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentAck504 &previousUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalId() SBE_NOEXCEPT + { + return 39014; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t keepAliveInterval() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentAck504 &keepAliveInterval(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationId() SBE_NOEXCEPT + { + return 39022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secretKeySecureIDExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secretKeySecureIDExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secretKeySecureIDExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingOffset() SBE_NOEXCEPT + { + return 34; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t secretKeySecureIDExpiration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentAck504 &secretKeySecureIDExpiration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + EstablishmentAck504 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 36, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 37, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + EstablishmentAck504 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 37, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, EstablishmentAck504 _writer) +{ + EstablishmentAck504 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "EstablishmentAck504", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("PreviousSeqNo": )"; + builder << +writer.previousSeqNo(); + + builder << ", "; + builder << R"("PreviousUUID": )"; + builder << +writer.previousUUID(); + + builder << ", "; + builder << R"("KeepAliveInterval": )"; + builder << +writer.keepAliveInterval(); + + builder << ", "; + builder << R"("SecretKeySecureIDExpiration": )"; + builder << +writer.secretKeySecureIDExpiration(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h b/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h new file mode 100644 index 000000000..26b52954c --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h @@ -0,0 +1,1011 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISHMENTREJECT505_H_ +#define _ILINKBINARY_ESTABLISHMENTREJECT505_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class EstablishmentReject505 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + EstablishmentReject505() = default; + + EstablishmentReject505( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + EstablishmentReject505(char *buffer, const std::uint64_t bufferLength) : + EstablishmentReject505(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + EstablishmentReject505( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + EstablishmentReject505(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)72; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "EstablishmentReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + EstablishmentReject505 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = EstablishmentReject505(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + EstablishmentReject505 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = EstablishmentReject505( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + EstablishmentReject505 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = EstablishmentReject505(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + EstablishmentReject505 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + EstablishmentReject505 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + EstablishmentReject505 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + SBE_NODISCARD std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + EstablishmentReject505 &putReason(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + EstablishmentReject505 &putReason(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentReject505 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentReject505 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentReject505 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentReject505 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + EstablishmentReject505 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + EstablishmentReject505 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, EstablishmentReject505 _writer) +{ + EstablishmentReject505 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "EstablishmentReject505", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h b/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h new file mode 100644 index 000000000..609da6199 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECACKSTATUS_H_ +#define _ILINKBINARY_EXECACKSTATUS_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ExecAckStatus +{ +public: + enum Value + { + Accepted = (std::uint8_t)1, + Rejected = (std::uint8_t)2, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum ExecAckStatus [E103]"); + } + + static const char* c_str(const ExecAckStatus::Value value) + { + switch (value) + { + case Accepted: return "Accepted"; + case Rejected: return "Rejected"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecAckStatus [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ExecAckStatus::Value m) + { + return os << ExecAckStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecInst.h b/src/lib/orderman/actors/ilink3/generated/ExecInst.h new file mode 100644 index 000000000..45dac3d21 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecInst.h @@ -0,0 +1,518 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECINST_H_ +#define _ILINKBINARY_EXECINST_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ExecInst +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecInst() = default; + + ExecInst( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + ExecInst( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + ExecInst(buffer, 0, bufferLength, actingVersion) + { + } + + ExecInst( + char *buffer, + const std::uint64_t bufferLength) : + ExecInst(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + ExecInst &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecInst(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + ExecInst &clear() + { + std::uint8_t zero = 0; + std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD bool isEmpty() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return 0 == val; + } + + SBE_NODISCARD std::uint8_t rawValue() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return val; + } + + ExecInst &rawValue(std::uint8_t value) + { + std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); + return *this; + } + + static bool aON(const std::uint8_t bits) + { + return (bits & (1u << 0u)) != 0; + } + + static std::uint8_t aON(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 0u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &aON(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 0u)) : static_cast((bits) & ~(1u << 0u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool oB(const std::uint8_t bits) + { + return (bits & (1u << 1u)) != 0; + } + + static std::uint8_t oB(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 1u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &oB(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 1u)) : static_cast((bits) & ~(1u << 1u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool nH(const std::uint8_t bits) + { + return (bits & (1u << 2u)) != 0; + } + + static std::uint8_t nH(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 2u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &nH(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 2u)) : static_cast((bits) & ~(1u << 2u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved1(const std::uint8_t bits) + { + return (bits & (1u << 3u)) != 0; + } + + static std::uint8_t reserved1(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 3u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &reserved1(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 3u)) : static_cast((bits) & ~(1u << 3u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved2(const std::uint8_t bits) + { + return (bits & (1u << 4u)) != 0; + } + + static std::uint8_t reserved2(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 4u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &reserved2(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 4u)) : static_cast((bits) & ~(1u << 4u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved3(const std::uint8_t bits) + { + return (bits & (1u << 5u)) != 0; + } + + static std::uint8_t reserved3(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 5u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &reserved3(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 5u)) : static_cast((bits) & ~(1u << 5u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved4(const std::uint8_t bits) + { + return (bits & (1u << 6u)) != 0; + } + + static std::uint8_t reserved4(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 6u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &reserved4(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 6u)) : static_cast((bits) & ~(1u << 6u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved5(const std::uint8_t bits) + { + return (bits & (1u << 7u)) != 0; + } + + static std::uint8_t reserved5(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 7u)) : static_cast(bits & ~(1u << 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; + } + + ExecInst &reserved5(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 7u)) : static_cast((bits) & ~(1u << 7u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecInst writer) + { + builder << '['; + bool atLeastOne = false; + if (writer.aON()) + { + builder << R"("aON")"; + atLeastOne = true; + } + if (writer.oB()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("oB")"; + atLeastOne = true; + } + if (writer.nH()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("nH")"; + atLeastOne = true; + } + if (writer.reserved1()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved1")"; + atLeastOne = true; + } + if (writer.reserved2()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved2")"; + atLeastOne = true; + } + if (writer.reserved3()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved3")"; + atLeastOne = true; + } + if (writer.reserved4()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved4")"; + atLeastOne = true; + } + if (writer.reserved5()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved5")"; + } + builder << ']'; + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecMode.h b/src/lib/orderman/actors/ilink3/generated/ExecMode.h new file mode 100644 index 000000000..14d484a3c --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecMode.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECMODE_H_ +#define _ILINKBINARY_EXECMODE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ExecMode +{ +public: + enum Value + { + Aggressive = (char)65, + Passive = (char)80, + NULL_VALUE = (char)0 + }; + + static ExecMode::Value get(const char value) + { + switch (value) + { + case 65: return Aggressive; + case 80: return Passive; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecMode [E103]"); + } + + static const char* c_str(const ExecMode::Value value) + { + switch (value) + { + case Aggressive: return "Aggressive"; + case Passive: return "Passive"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecMode [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ExecMode::Value m) + { + return os << ExecMode::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecReason.h b/src/lib/orderman/actors/ilink3/generated/ExecReason.h new file mode 100644 index 000000000..7c1f140a3 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecReason.h @@ -0,0 +1,162 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECREASON_H_ +#define _ILINKBINARY_EXECREASON_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum ExecReason [E103]"); + } + + static const char* c_str(const ExecReason::Value value) + { + switch (value) + { + case MarketExchangeOption: return "MarketExchangeOption"; + case CancelledNotBest: return "CancelledNotBest"; + case CancelOnDisconnect: return "CancelOnDisconnect"; + case SelfMatchPreventionOldestOrderCancelled: return "SelfMatchPreventionOldestOrderCancelled"; + case CancelOnGlobexCreditControlsViolation: return "CancelOnGlobexCreditControlsViolation"; + case CancelFromFirmsoft: return "CancelFromFirmsoft"; + case CancelFromRiskManagementAPI: return "CancelFromRiskManagementAPI"; + case SelfMatchPreventionNewestOrderCancelled: return "SelfMatchPreventionNewestOrderCancelled"; + case Cancelduetovolquotedoptionorderrestedqtylessthanminordersize: return "Cancelduetovolquotedoptionorderrestedqtylessthanminordersize"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecReason [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ExecReason::Value m) + { + return os << ExecReason::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h b/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h new file mode 100644 index 000000000..a2d85b855 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECTYPTRDCXL_H_ +#define _ILINKBINARY_EXECTYPTRDCXL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ExecTypTrdCxl +{ +public: + enum Value + { + TradeCorrection = (char)71, + TradeCancel = (char)72, + NULL_VALUE = (char)0 + }; + + static ExecTypTrdCxl::Value get(const char value) + { + switch (value) + { + case 71: return TradeCorrection; + case 72: return TradeCancel; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecTypTrdCxl [E103]"); + } + + static const char* c_str(const ExecTypTrdCxl::Value value) + { + switch (value) + { + case TradeCorrection: return "TradeCorrection"; + case TradeCancel: return "TradeCancel"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecTypTrdCxl [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ExecTypTrdCxl::Value m) + { + return os << ExecTypTrdCxl::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h b/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h new file mode 100644 index 000000000..483abe136 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h @@ -0,0 +1,1879 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONACK539_H_ +#define _ILINKBINARY_EXECUTIONACK539_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionAck539 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionAck539() = default; + + ExecutionAck539( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionAck539(char *buffer, const std::uint64_t bufferLength) : + ExecutionAck539(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionAck539( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionAck539(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)101; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)539; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "BN"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionAck539 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionAck539(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionAck539 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionAck539( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionAck539 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionAck539(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionAck539 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionAck539 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionAck539 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecAckStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execAckStatusId() SBE_NOEXCEPT + { + return 1036; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execAckStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execAckStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execAckStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execAckStatusEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execAckStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecAckStatus::Value execAckStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ExecAckStatus::get((val)); + } + + ExecutionAck539 &execAckStatus(const ExecAckStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionAck539 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionAck539 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionAck539 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionAck539 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + ExecutionAck539 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionAck539 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 49, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 57; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 57, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionAck539 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 57, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionAck539 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DKReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t dKReasonId() SBE_NOEXCEPT + { + return 127; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t dKReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool dKReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= dKReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dKReasonEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dKReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD DKReason::Value dKReason() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(char)); + return DKReason::get((val)); + } + + ExecutionAck539 &dKReason(const DKReason::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionAck539 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return nullptr; + } + + return m_buffer + m_offset + 67; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return nullptr; + } + + return m_buffer + m_offset + 67; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + if (m_actingVersion < 4) + { + return (char)0; + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 67 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionAck539 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 67 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + if (m_actingVersion < 4) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 67, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionAck539 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 67, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 67; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 67; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionAck539 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 67 + start] = 0; + } + + return *this; + } + #else + ExecutionAck539 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 67 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionAck539 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 95; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return nullptr; + } + + return m_buffer + m_offset + 95; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return nullptr; + } + + return m_buffer + m_offset + 95; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + if (m_actingVersion < 5) + { + return (char)0; + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 95 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionAck539 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 95 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + if (m_actingVersion < 5) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 95, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionAck539 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 95, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 95; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 95; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionAck539 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 95 + start] = 0; + } + + return *this; + } + #else + ExecutionAck539 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 95 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return ManualOrdIndReq::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionAck539 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionAck539 _writer) +{ + ExecutionAck539 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionAck539", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("ExecAckStatus": )"; + builder << '"' << writer.execAckStatus() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("DKReason": )"; + builder << '"' << writer.dKReason() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h new file mode 100644 index 000000000..f93457f36 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h @@ -0,0 +1,3647 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTCANCEL534_H_ +#define _ILINKBINARY_EXECUTIONREPORTCANCEL534_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportCancel534 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportCancel534() = default; + + ExecutionReportCancel534( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportCancel534(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportCancel534(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportCancel534( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportCancel534(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)214; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)534; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportCancel534 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportCancel534(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportCancel534 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportCancel534( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportCancel534 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportCancel534(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportCancel534 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 164 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportCancel534 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 191; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportCancel534 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 52 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 52 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 52 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 52 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 52 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 52 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 52 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 52 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportCancel534 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportCancel534 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportCancel534 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportCancel534 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportCancel534 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportCancel534 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecRestatementReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execRestatementReasonId() SBE_NOEXCEPT + { + return 378; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execRestatementReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execRestatementReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execRestatementReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRestatementReasonEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRestatementReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecReason::Value execRestatementReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return ExecReason::get((val)); + } + + ExecutionReportCancel534 &execRestatementReason(const ExecReason::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 200; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportCancel534 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 201, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 202, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportCancel534 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 202, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 203; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportCancel534 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 204; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportCancel534 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportCancel534 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 206; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 206, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 206, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportCancel534 _writer) +{ + ExecutionReportCancel534 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportCancel534", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("ExecRestatementReason": )"; + builder << '"' << writer.execRestatementReason() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h new file mode 100644 index 000000000..349b6713a --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h @@ -0,0 +1,3372 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTELIMINATION524_H_ +#define _ILINKBINARY_EXECUTIONREPORTELIMINATION524_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportElimination524 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportElimination524() = default; + + ExecutionReportElimination524( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportElimination524(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportElimination524(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportElimination524( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportElimination524(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)524; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportElimination524 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportElimination524(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportElimination524 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportElimination524( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportElimination524 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportElimination524(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportElimination524 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 164 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 67 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 67 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 67 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 67 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 67 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 67 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportElimination524 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportElimination524 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 192; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportElimination524 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportElimination524 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportElimination524 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportElimination524 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportElimination524 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 197, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportElimination524 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportElimination524 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportElimination524 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportElimination524 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportElimination524 _writer) +{ + ExecutionReportElimination524 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportElimination524", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h new file mode 100644 index 000000000..825b72969 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h @@ -0,0 +1,3662 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTMODIFY531_H_ +#define _ILINKBINARY_EXECUTIONREPORTMODIFY531_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportModify531 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportModify531() = default; + + ExecutionReportModify531( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportModify531(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportModify531(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportModify531( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportModify531(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)217; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)531; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportModify531 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportModify531(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportModify531 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportModify531( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportModify531 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportModify531(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportModify531 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 164 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportModify531 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportModify531 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 53 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 53 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 53 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 53 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 53 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 53 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 53 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 53 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportModify531 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportModify531 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportModify531 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportModify531 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportModify531 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 202, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportModify531 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 202, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 203; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportModify531 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 204; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 204, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportModify531 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 206; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 206, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportModify531 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 206, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 207; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 207, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportModify531 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 207, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 208; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 208, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportModify531 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 208, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 209; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 209, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 209, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportModify531 _writer) +{ + ExecutionReportModify531 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportModify531", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h new file mode 100644 index 000000000..4088b99a3 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h @@ -0,0 +1,3512 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTNEW522_H_ +#define _ILINKBINARY_EXECUTIONREPORTNEW522_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportNew522 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportNew522() = default; + + ExecutionReportNew522( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportNew522(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportNew522(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportNew522( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportNew522(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)209; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)522; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportNew522 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportNew522(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportNew522 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportNew522( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportNew522 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportNew522(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportNew522 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 164 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportNew522 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 187; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 187, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportNew522 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 187, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 48 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 48 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 48 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 48 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 48 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 48 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportNew522 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 190; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportNew522 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportNew522 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 192; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportNew522 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportNew522 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportNew522 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportNew522 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 196, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportNew522 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportNew522 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportNew522 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportNew522 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportNew522 _writer) +{ + ExecutionReportNew522 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportNew522", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h new file mode 100644 index 000000000..06b723229 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h @@ -0,0 +1,3798 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTREJECT523_H_ +#define _ILINKBINARY_EXECUTIONREPORTREJECT523_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportReject523 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportReject523() = default; + + ExecutionReportReject523( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportReject523(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportReject523(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportReject523( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportReject523(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)467; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)523; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportReject523 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportReject523(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportReject523 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportReject523( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportReject523 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportReject523(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportReject523 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putExecID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putExecID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 308 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 308 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 328 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 328 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 364; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 364, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 372, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 380; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 388; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 388, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 388, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 396; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 396, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 396, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 404; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 404, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 412; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 412, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 412, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 420; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 420; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 420; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 420 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 420 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 420, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 420, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 420; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 420; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 420, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 420 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 420, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 420 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 425; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 425, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 425, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 429; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 429, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 429, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 433; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 433, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 433, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 437; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 437, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 437, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonId() SBE_NOEXCEPT + { + return 103; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 441; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t ordRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t ordRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 441, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &ordRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 441, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 443; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 443, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 443, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 445; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 445, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 445, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 447; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 56 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 56 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 56 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 447; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 56 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 56 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 56 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 447; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 447, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportReject523 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 447, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 448; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 448, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportReject523 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 448, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 449; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 449, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportReject523 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 449, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 450; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 450, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportReject523 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 450, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 451; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 451, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportReject523 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 451, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 452; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 452, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportReject523 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 452, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 453; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 453, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportReject523 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 453, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 454; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 454, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 455; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 455, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportReject523 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 455, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 456; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 456, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportReject523 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 456, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 457; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 457, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportReject523 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 457, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 458; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 458, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportReject523 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 458, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 459; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 459, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 459, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportReject523 _writer) +{ + ExecutionReportReject523 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportReject523", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("OrdRejReason": )"; + builder << +writer.ordRejReason(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h new file mode 100644 index 000000000..bb32249b8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h @@ -0,0 +1,3803 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTSTATUS532_H_ +#define _ILINKBINARY_EXECUTIONREPORTSTATUS532_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportStatus532 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportStatus532() = default; + + ExecutionReportStatus532( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportStatus532(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportStatus532(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportStatus532( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportStatus532(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)480; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)532; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportStatus532 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportStatus532(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportStatus532 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportStatus532( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportStatus532 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportStatus532(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportStatus532 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putExecID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putExecID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 308 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 308 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 328 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 328 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 364; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 364, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 372, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 380; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 388; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 388, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 388, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 396; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 396, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 396, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqIDId() SBE_NOEXCEPT + { + return 790; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 404; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t ordStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 404, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &ordStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqIDId() SBE_NOEXCEPT + { + return 584; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 412; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 412, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &massStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 412, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 420; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 420, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 420, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 428; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 428, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 428, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 436; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 436; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 436; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 436 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 436 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 436, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 436, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 436; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 436; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 436, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 436 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 436, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 436 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 441; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 441, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 441, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 445; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 445, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 445, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 449; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 449, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 449, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 453; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 453, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 453, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 457; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 457, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 457, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 461; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 461, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 461, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 465; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 465, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportStatus532 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 465, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 467; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderStatus::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 467, sizeof(char)); + return OrderStatus::get((val)); + } + + ExecutionReportStatus532 &ordStatus(const OrderStatus::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 467, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 468; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 73 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 73 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 73 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 73 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 468; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 468, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportStatus532 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 468, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 469; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 469, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportStatus532 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 469, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 470; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 470, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportStatus532 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 470, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 471; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 471, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportStatus532 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 471, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 472; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 472, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportStatus532 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 472, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastRptRequestedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastRptRequestedId() SBE_NOEXCEPT + { + return 912; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastRptRequestedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastRptRequestedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastRptRequestedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastRptRequestedEncodingOffset() SBE_NOEXCEPT + { + return 473; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastRptRequestedEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value lastRptRequested() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 473, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &lastRptRequested(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 473, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 474; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 474, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportStatus532 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 474, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 475; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 475, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 476; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 476, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportStatus532 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 476, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 477; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 477, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 477, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 478; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 478, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 478, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 479; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 479, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportStatus532 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 479, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportStatus532 _writer) +{ + ExecutionReportStatus532 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportStatus532", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("OrdStatusReqID": )"; + builder << +writer.ordStatusReqID(); + + builder << ", "; + builder << R"("MassStatusReqID": )"; + builder << +writer.massStatusReqID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("LastRptRequested": )"; + builder << '"' << writer.lastRptRequested() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h new file mode 100644 index 000000000..d22fa1e5d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h @@ -0,0 +1,4407 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeAddendumOutright548 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeAddendumOutright548() = default; + + ExecutionReportTradeAddendumOutright548( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumOutright548(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumOutright548(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumOutright548( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumOutright548(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)181; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumOutright548 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumOutright548 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeAddendumOutright548( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumOutright548 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeAddendumOutright548 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 148 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumOutright548 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 171; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 171, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 171, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 174; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 174, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 174, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 175, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 175, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 176; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 176, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 178; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 178, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 178, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 179; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 179, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 179, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 180; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 180, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 180, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)27); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 27; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 27; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OriginalOrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t originalOrderEventExecIDId() SBE_NOEXCEPT + { + return 6555; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t originalOrderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD bool originalOrderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= originalOrderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t originalOrderEventExecID() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return 4294967295; + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &originalOrderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << ", "; + builder << R"("OriginalOrderEventExecID": )"; + builder << +writer.originalOrderEventExecID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeAddendumOutright548 _writer) +{ + ExecutionReportTradeAddendumOutright548 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumOutright548", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h new file mode 100644 index 000000000..b578a5aa5 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h @@ -0,0 +1,5433 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeAddendumSpread549 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeAddendumSpread549() = default; + + ExecutionReportTradeAddendumSpread549( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumSpread549(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumSpread549(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumSpread549( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumSpread549(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)187; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumSpread549 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpread549 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeAddendumSpread549( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpread549 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeAddendumSpread549 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 148 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumSpread549 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 175, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 175, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 176; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 176, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 176, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 178; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 178, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 178, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 179; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 179, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 179, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 180; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 180, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 180, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalNumSecuritiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totalNumSecuritiesId() SBE_NOEXCEPT + { + return 393; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalNumSecuritiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalNumSecuritiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalNumSecuritiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalNumSecurities() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &totalNumSecurities(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 182; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 182, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 183; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 183, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 183, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 184; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 184, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 184, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 186; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)41); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 41; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 41; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoLegs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legExecIDId() SBE_NOEXCEPT + { + return 1893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoLegs &legExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastPxMetaAttribute(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 legLastPxId() SBE_NOEXCEPT + { + return 637; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICE9 m_legLastPx; + +public: + SBE_NODISCARD PRICE9 &legLastPx() + { + m_legLastPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legLastPx; + } + + SBE_NODISCARD static const char * LegExecRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legExecRefIDId() SBE_NOEXCEPT + { + return 1901; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecRefIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecRefIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecRefIDEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecRefIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecRefID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoLegs &legExecRefID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legTradeIDId() SBE_NOEXCEPT + { + return 1894; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legTradeRefIDId() SBE_NOEXCEPT + { + return 39023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeRefIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeRefIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeRefIDEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeRefIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeRefID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legTradeRefID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legLastQtyId() SBE_NOEXCEPT + { + return 1418; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legLastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legLastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legLastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 36, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegExecID": )"; + builder << +writer.legExecID(); + + builder << ", "; + builder << R"("LegLastPx": )"; + builder << writer.legLastPx(); + + builder << ", "; + builder << R"("LegExecRefID": )"; + builder << +writer.legExecRefID(); + + builder << ", "; + builder << R"("LegTradeID": )"; + builder << +writer.legTradeID(); + + builder << ", "; + builder << R"("LegTradeRefID": )"; + builder << +writer.legTradeRefID(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegLastQty": )"; + builder << +writer.legLastQty(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)27); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 27; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 27; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OriginalOrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t originalOrderEventExecIDId() SBE_NOEXCEPT + { + return 6555; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t originalOrderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD bool originalOrderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= originalOrderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t originalOrderEventExecID() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return 4294967295; + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &originalOrderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << ", "; + builder << R"("OriginalOrderEventExecID": )"; + builder << +writer.originalOrderEventExecID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeAddendumSpread549 _writer) +{ + ExecutionReportTradeAddendumSpread549 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumSpread549", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("TotalNumSecurities": )"; + builder << +writer.totalNumSecurities(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoLegsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoLegs::sbeHeaderSize(); + if (NoLegsLength > 254) + { + throw std::runtime_error("NoLegsLength outside of allowed range [E110]"); + } + length += NoLegsLength * NoLegs::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h new file mode 100644 index 000000000..21773d5a9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h @@ -0,0 +1,4116 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeAddendumSpreadLeg550 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeAddendumSpreadLeg550() = default; + + ExecutionReportTradeAddendumSpreadLeg550( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumSpreadLeg550(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumSpreadLeg550(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumSpreadLeg550( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumSpreadLeg550(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)176; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)550; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumSpreadLeg550 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpreadLeg550 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeAddendumSpreadLeg550( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpreadLeg550 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeAddendumSpreadLeg550 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 148 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 171; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 171, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 171, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 174; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 174, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 174, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return SideReq::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 175, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 175, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)27); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 27; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 27; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OriginalOrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t originalOrderEventExecIDId() SBE_NOEXCEPT + { + return 6555; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t originalOrderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD bool originalOrderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= originalOrderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t originalOrderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t originalOrderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t originalOrderEventExecID() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return 4294967295; + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &originalOrderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << ", "; + builder << R"("OriginalOrderEventExecID": )"; + builder << +writer.originalOrderEventExecID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeAddendumSpreadLeg550 _writer) +{ + ExecutionReportTradeAddendumSpreadLeg550 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumSpreadLeg550", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h new file mode 100644 index 000000000..108c0636d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h @@ -0,0 +1,5349 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeOutright525 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeOutright525() = default; + + ExecutionReportTradeOutright525( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeOutright525(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeOutright525(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeOutright525( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeOutright525(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)235; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)525; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeOutright525 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeOutright525(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeOutright525 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeOutright525( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeOutright525 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeOutright525(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeOutright525 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 164, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 164, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 180; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 180 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 180 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 180, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 180, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeLinkIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeLinkIDId() SBE_NOEXCEPT + { + return 820; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeLinkIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeLinkIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeLinkIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeLinkIDEncodingOffset() SBE_NOEXCEPT + { + return 209; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t tradeLinkIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t tradeLinkID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 209, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &tradeLinkID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 209, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 213; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 217; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 217, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeOutright525 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 217, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 219; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 219, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeOutright525 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 219, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 221; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 221, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeOutright525 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 221, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 222, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeOutright525 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 222, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 223; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 223, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeOutright525 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 223, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 224; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 224, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportTradeOutright525 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 224, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 225; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeOutright525 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 226; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 226, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeOutright525 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 226, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AggressorIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t aggressorIndicatorId() SBE_NOEXCEPT + { + return 1057; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= aggressorIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 227; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value aggressorIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 227, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeOutright525 &aggressorIndicator(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 227, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 228; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 228, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeOutright525 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 228, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 229; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 229, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 230; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 230, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeOutright525 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 230, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 231, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeOutright525 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 231, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 232; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 232, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeOutright525 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 232, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 233; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 233, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeOutright525 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 233, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OwnershipMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ownershipId() SBE_NOEXCEPT + { + return 7191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ownershipSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ownershipInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ownershipSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ownershipEncodingOffset() SBE_NOEXCEPT + { + return 234; + } + + static SBE_CONSTEXPR std::uint8_t ownershipNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t ownershipMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t ownershipMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t ownershipEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t ownership() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 234, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeOutright525 &ownership(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 234, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeOutright525 _writer) +{ + ExecutionReportTradeOutright525 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeOutright525", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("TradeLinkID": )"; + builder << +writer.tradeLinkID(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("AggressorIndicator": )"; + builder << '"' << writer.aggressorIndicator() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("Ownership": )"; + builder << +writer.ownership(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h new file mode 100644 index 000000000..574f67e09 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h @@ -0,0 +1,5880 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeSpread526 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeSpread526() = default; + + ExecutionReportTradeSpread526( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeSpread526(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeSpread526(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeSpread526( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeSpread526(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)230; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)526; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeSpread526 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpread526(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeSpread526 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeSpread526( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeSpread526 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpread526(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeSpread526 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 148; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 164; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 164, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 164, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 180; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 180 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 180 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 180, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 180, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 209; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 209, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 209, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 213; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpread526 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 215; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 215, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpread526 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 215, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 217; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 217, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeSpread526 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 217, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 218; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 218; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 218, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeSpread526 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 218, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 219; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 219, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeSpread526 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 219, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 220; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 220, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportTradeSpread526 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 220, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 221; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 221, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeSpread526 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 221, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 222, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpread526 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 222, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AggressorIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t aggressorIndicatorId() SBE_NOEXCEPT + { + return 1057; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= aggressorIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 223; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value aggressorIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 223, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpread526 &aggressorIndicator(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 223, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 224; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 224, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeSpread526 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 224, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalNumSecuritiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totalNumSecuritiesId() SBE_NOEXCEPT + { + return 393; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalNumSecuritiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalNumSecuritiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalNumSecuritiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingOffset() SBE_NOEXCEPT + { + return 225; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalNumSecurities() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeSpread526 &totalNumSecurities(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 226; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 226, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 227; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 227, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeSpread526 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 227, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 228; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 228, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeSpread526 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 228, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 229; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 229, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeSpread526 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 229, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)29); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 29; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 29; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoLegs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legExecIDId() SBE_NOEXCEPT + { + return 1893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoLegs &legExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastPxMetaAttribute(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 legLastPxId() SBE_NOEXCEPT + { + return 637; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICE9 m_legLastPx; + +public: + SBE_NODISCARD PRICE9 &legLastPx() + { + m_legLastPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legLastPx; + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legTradeIDId() SBE_NOEXCEPT + { + return 1894; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legLastQtyId() SBE_NOEXCEPT + { + return 1418; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legLastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legLastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legLastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegExecID": )"; + builder << +writer.legExecID(); + + builder << ", "; + builder << R"("LegLastPx": )"; + builder << writer.legLastPx(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegTradeID": )"; + builder << +writer.legTradeID(); + + builder << ", "; + builder << R"("LegLastQty": )"; + builder << +writer.legLastQty(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeSpread526 _writer) +{ + ExecutionReportTradeSpread526 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeSpread526", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("AggressorIndicator": )"; + builder << '"' << writer.aggressorIndicator() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("TotalNumSecurities": )"; + builder << +writer.totalNumSecurities(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoLegsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoLegs::sbeHeaderSize(); + if (NoLegsLength > 254) + { + throw std::runtime_error("NoLegsLength outside of allowed range [E110]"); + } + length += NoLegsLength * NoLegs::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h new file mode 100644 index 000000000..377e4e33e --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h @@ -0,0 +1,4276 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class ExecutionReportTradeSpreadLeg527 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + ExecutionReportTradeSpreadLeg527() = default; + + ExecutionReportTradeSpreadLeg527( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + ExecutionReportTradeSpreadLeg527(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeSpreadLeg527(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeSpreadLeg527( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeSpreadLeg527(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeSpreadLeg527 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeSpreadLeg527 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = ExecutionReportTradeSpreadLeg527( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeSpreadLeg527 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + ExecutionReportTradeSpreadLeg527 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * VolatilityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t volatilityId() SBE_NOEXCEPT + { + return 1188; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t volatilitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool volatilityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= volatilitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t volatilityEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + +private: + Decimal64NULL m_volatility; + +public: + SBE_NODISCARD Decimal64NULL &volatility() + { + m_volatility.wrap(m_buffer, m_offset + 92, m_actingVersion, m_bufferLength); + return m_volatility; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 101; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 101, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 101, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(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 lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 109; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 109, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 117; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 117, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 117, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * UnderlyingPxMetaAttribute(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 underlyingPxId() SBE_NOEXCEPT + { + return 810; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= underlyingPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingPxEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + +private: + PRICENULL9 m_underlyingPx; + +public: + SBE_NODISCARD PRICENULL9 &underlyingPx() + { + m_underlyingPx.wrap(m_buffer, m_offset + 125, m_actingVersion, m_bufferLength); + return m_underlyingPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 133; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 133, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 133, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 141; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 141, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 141, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 149; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 149, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 149, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 157; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 157; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 157 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 157 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 157, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 157, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 157; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 157; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 157, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 157 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 157, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 157 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t optionDeltaId() SBE_NOEXCEPT + { + return 811; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t optionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool optionDeltaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= optionDeltaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t optionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 162; + } + +private: + Decimal32NULL m_optionDelta; + +public: + SBE_NODISCARD Decimal32NULL &optionDelta() + { + m_optionDelta.wrap(m_buffer, m_offset + 162, m_actingVersion, m_bufferLength); + return m_optionDelta; + } + + SBE_NODISCARD static const char * TimeToExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeToExpirationId() SBE_NOEXCEPT + { + return 1189; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeToExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeToExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeToExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeToExpirationEncodingOffset() SBE_NOEXCEPT + { + return 167; + } + +private: + Decimal32NULL m_timeToExpiration; + +public: + SBE_NODISCARD Decimal32NULL &timeToExpiration() + { + m_timeToExpiration.wrap(m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); + return m_timeToExpiration; + } + + SBE_NODISCARD static const char * RiskFreeRateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t riskFreeRateId() SBE_NOEXCEPT + { + return 1190; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t riskFreeRateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool riskFreeRateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= riskFreeRateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t riskFreeRateEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + +private: + Decimal32NULL m_riskFreeRate; + +public: + SBE_NODISCARD Decimal32NULL &riskFreeRate() + { + m_riskFreeRate.wrap(m_buffer, m_offset + 172, m_actingVersion, m_bufferLength); + return m_riskFreeRate; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpreadLeg527 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoFills &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(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 fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoFills &fillQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderEvents &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(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 orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ExecutionReportTradeSpreadLeg527 _writer) +{ + ExecutionReportTradeSpreadLeg527 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeSpreadLeg527", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Volatility": )"; + builder << writer.volatility(); + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("UnderlyingPx": )"; + builder << writer.underlyingPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OptionDelta": )"; + builder << writer.optionDelta(); + + builder << ", "; + builder << R"("TimeToExpiration": )"; + builder << writer.timeToExpiration(); + + builder << ", "; + builder << R"("RiskFreeRate": )"; + builder << writer.riskFreeRate(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noFills().forEach([](NoFills e) + { + e.skip(); + }); + noOrderEvents().forEach([](NoOrderEvents e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoFillsLength = 0, + std::size_t NoOrderEventsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoFills::sbeHeaderSize(); + if (NoFillsLength > 254) + { + throw std::runtime_error("NoFillsLength outside of allowed range [E110]"); + } + length += NoFillsLength * NoFills::sbeBlockLength(); + + length += NoOrderEvents::sbeHeaderSize(); + if (NoOrderEventsLength > 254) + { + throw std::runtime_error("NoOrderEventsLength outside of allowed range [E110]"); + } + length += NoOrderEventsLength * NoOrderEvents::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ExpCycle.h b/src/lib/orderman/actors/ilink3/generated/ExpCycle.h new file mode 100644 index 000000000..741e0e369 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ExpCycle.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXPCYCLE_H_ +#define _ILINKBINARY_EXPCYCLE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ExpCycle +{ +public: + enum Value + { + ExpireOnTradingSessionClose = (std::uint8_t)0, + Expirationatgivendate = (std::uint8_t)2, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum ExpCycle [E103]"); + } + + static const char* c_str(const ExpCycle::Value value) + { + switch (value) + { + case ExpireOnTradingSessionClose: return "ExpireOnTradingSessionClose"; + case Expirationatgivendate: return "Expirationatgivendate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExpCycle [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ExpCycle::Value m) + { + return os << ExpCycle::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/FTI.h b/src/lib/orderman/actors/ilink3/generated/FTI.h new file mode 100644 index 000000000..3c77d5170 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/FTI.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_FTI_H_ +#define _ILINKBINARY_FTI_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class FTI +{ +public: + enum Value + { + Backup = (std::uint8_t)0, + Primary = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum FTI [E103]"); + } + + static const char* c_str(const FTI::Value value) + { + switch (value) + { + case Backup: return "Backup"; + case Primary: return "Primary"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum FTI [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, FTI::Value m) + { + return os << FTI::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/GroupSize.h b/src/lib/orderman/actors/ilink3/generated/GroupSize.h new file mode 100644 index 000000000..5c7869dab --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/GroupSize.h @@ -0,0 +1,366 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_GROUPSIZE_H_ +#define _ILINKBINARY_GROUPSIZE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class GroupSize +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + GroupSize() = default; + + GroupSize( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 3) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + GroupSize( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + GroupSize(buffer, 0, bufferLength, actingVersion) + { + } + + GroupSize( + char *buffer, + const std::uint64_t bufferLength) : + GroupSize(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + GroupSize &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = GroupSize(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t blockLengthId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= blockLengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + GroupSize &blockLength(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t numInGroupId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numInGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= numInGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numInGroupEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } + + GroupSize &numInGroup(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, GroupSize writer) +{ + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); + + builder << ", "; + builder << R"("numInGroup": )"; + builder << +writer.numInGroup(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h b/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h new file mode 100644 index 000000000..a73d4def8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_KEEPALIVELAPSED_H_ +#define _ILINKBINARY_KEEPALIVELAPSED_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class KeepAliveLapsed +{ +public: + enum Value + { + NotLapsed = (std::uint8_t)0, + Lapsed = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum KeepAliveLapsed [E103]"); + } + + static const char* c_str(const KeepAliveLapsed::Value value) + { + switch (value) + { + case NotLapsed: return "NotLapsed"; + case Lapsed: return "Lapsed"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum KeepAliveLapsed [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, KeepAliveLapsed::Value m) + { + return os << KeepAliveLapsed::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h b/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h new file mode 100644 index 000000000..de63a68b3 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_LISTUPDACT_H_ +#define _ILINKBINARY_LISTUPDACT_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ListUpdAct +{ +public: + enum Value + { + Add = (char)65, + Delete = (char)68, + NULL_VALUE = (char)0 + }; + + static ListUpdAct::Value get(const char value) + { + switch (value) + { + case 65: return Add; + case 68: return Delete; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ListUpdAct [E103]"); + } + + static const char* c_str(const ListUpdAct::Value value) + { + switch (value) + { + case Add: return "Add"; + case Delete: return "Delete"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ListUpdAct [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ListUpdAct::Value m) + { + return os << ListUpdAct::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h b/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h new file mode 100644 index 000000000..e2c28643f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MANUALORDIND_H_ +#define _ILINKBINARY_MANUALORDIND_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ManualOrdInd +{ +public: + enum Value + { + Automated = (std::uint8_t)0, + Manual = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum ManualOrdInd [E103]"); + } + + static const char* c_str(const ManualOrdInd::Value value) + { + switch (value) + { + case Automated: return "Automated"; + case Manual: return "Manual"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ManualOrdInd [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ManualOrdInd::Value m) + { + return os << ManualOrdInd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h b/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h new file mode 100644 index 000000000..e7859a61c --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MANUALORDINDREQ_H_ +#define _ILINKBINARY_MANUALORDINDREQ_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ManualOrdIndReq +{ +public: + enum Value + { + Automated = (std::uint8_t)0, + Manual = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum ManualOrdIndReq [E103]"); + } + + static const char* c_str(const ManualOrdIndReq::Value value) + { + switch (value) + { + case Automated: return "Automated"; + case Manual: return "Manual"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ManualOrdIndReq [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ManualOrdIndReq::Value m) + { + return os << ManualOrdIndReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h b/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h new file mode 100644 index 000000000..8971490a8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONORDTYP_H_ +#define _ILINKBINARY_MASSACTIONORDTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MassActionOrdTyp +{ +public: + enum Value + { + Limit = (char)50, + StopLimit = (char)52, + NULL_VALUE = (char)0 + }; + + static MassActionOrdTyp::Value get(const char value) + { + switch (value) + { + case 50: return Limit; + case 52: return StopLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]"); + } + + static const char* c_str(const MassActionOrdTyp::Value value) + { + switch (value) + { + case Limit: return "Limit"; + case StopLimit: return "StopLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassActionOrdTyp::Value m) + { + return os << MassActionOrdTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h b/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h new file mode 100644 index 000000000..542c37708 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONRESPONSE_H_ +#define _ILINKBINARY_MASSACTIONRESPONSE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MassActionResponse +{ +public: + enum Value + { + Rejected = (std::uint8_t)0, + Accepted = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum MassActionResponse [E103]"); + } + + static const char* c_str(const MassActionResponse::Value value) + { + switch (value) + { + case Rejected: return "Rejected"; + case Accepted: return "Accepted"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionResponse [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassActionResponse::Value m) + { + return os << MassActionResponse::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionScope.h b/src/lib/orderman/actors/ilink3/generated/MassActionScope.h new file mode 100644 index 000000000..2ed70726b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassActionScope.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONSCOPE_H_ +#define _ILINKBINARY_MASSACTIONSCOPE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum MassActionScope [E103]"); + } + + static const char* c_str(const MassActionScope::Value value) + { + switch (value) + { + case Instrument: return "Instrument"; + case All: return "All"; + case MarketSegmentID: return "MarketSegmentID"; + case InstrumentGroup: return "InstrumentGroup"; + case QuoteSetID: return "QuoteSetID"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionScope [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassActionScope::Value m) + { + return os << MassActionScope::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h b/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h new file mode 100644 index 000000000..097dc7ef7 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSCANCELTIF_H_ +#define _ILINKBINARY_MASSCANCELTIF_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum MassCancelTIF [E103]"); + } + + static const char* c_str(const MassCancelTIF::Value value) + { + switch (value) + { + case Day: return "Day"; + case GoodTillCancel: return "GoodTillCancel"; + case GoodTillDate: return "GoodTillDate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassCancelTIF [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassCancelTIF::Value m) + { + return os << MassCancelTIF::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h b/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h new file mode 100644 index 000000000..814541e5a --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSCXLREQTYP_H_ +#define _ILINKBINARY_MASSCXLREQTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MassCxlReqTyp +{ +public: + enum Value + { + SenderSubID = (std::uint8_t)100, + Account = (std::uint8_t)101, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum MassCxlReqTyp [E103]"); + } + + static const char* c_str(const MassCxlReqTyp::Value value) + { + switch (value) + { + case SenderSubID: return "SenderSubID"; + case Account: return "Account"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassCxlReqTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassCxlReqTyp::Value m) + { + return os << MassCxlReqTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassQuote517.h b/src/lib/orderman/actors/ilink3/generated/MassQuote517.h new file mode 100644 index 000000000..b38ac14cf --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassQuote517.h @@ -0,0 +1,2529 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTE517_H_ +#define _ILINKBINARY_MASSQUOTE517_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class MassQuote517 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + MassQuote517() = default; + + MassQuote517( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + MassQuote517(char *buffer, const std::uint64_t bufferLength) : + MassQuote517(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuote517( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuote517(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)92; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)517; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "i"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuote517 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuote517(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuote517 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = MassQuote517( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuote517 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MassQuote517(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + MassQuote517 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuote517 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuote517 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuote517 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuote517 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + MassQuote517 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + MassQuote517 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuote517 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + MassQuote517 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + MassQuote517 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 54; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 54, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuote517 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 54, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 58; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 58, sizeof(std::uint8_t)); + return (val); + } + + MassQuote517 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 58, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuote517 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 59, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuote517 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuote517 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ReservedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservedId() SBE_NOEXCEPT + { + return 5187; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservedSinceVersion() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD bool reservedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservedEncodingOffset() SBE_NOEXCEPT + { + return 62; + } + + static SBE_CONSTEXPR char reservedNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reservedMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reservedMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reservedEncodingLength() SBE_NOEXCEPT + { + return 30; + } + + static SBE_CONSTEXPR std::uint64_t reservedLength() SBE_NOEXCEPT + { + return 30; + } + + SBE_NODISCARD const char *reserved() const SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return nullptr; + } + + return m_buffer + m_offset + 62; + } + + SBE_NODISCARD char *reserved() SBE_NOEXCEPT + { + if (m_actingVersion < 5) + { + return nullptr; + } + + return m_buffer + m_offset + 62; + } + + SBE_NODISCARD char reserved(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for reserved [E104]"); + } + + if (m_actingVersion < 5) + { + return (char)0; + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 62 + (index * 1), sizeof(char)); + return (val); + } + + MassQuote517 &reserved(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for reserved [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 62 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReserved(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getReserved [E106]"); + } + + if (m_actingVersion < 5) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 62, sizeof(char) * static_cast(length)); + return length; + } + + MassQuote517 &putReserved(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 62, src, sizeof(char) * 30); + return *this; + } + + SBE_NODISCARD std::string getReservedAsString() const + { + const char *buffer = m_buffer + m_offset + 62; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReservedAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReservedAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReservedAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 62; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putReserved(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 62 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putReserved(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 62 + start] = 0; + } + + return *this; + } + #endif + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)38); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 38; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * BidPxMetaAttribute(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 bidPxId() SBE_NOEXCEPT + { + return 132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_bidPx; + +public: + SBE_NODISCARD PRICENULL9 &bidPx() + { + m_bidPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_bidPx; + } + + SBE_NODISCARD static const char * OfferPxMetaAttribute(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 offerPxId() SBE_NOEXCEPT + { + return 133; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICENULL9 m_offerPx; + +public: + SBE_NODISCARD PRICENULL9 &offerPx() + { + m_offerPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_offerPx; + } + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t bidSizeId() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidSizeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t bidSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t bidSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &bidSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t offerSizeId() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerSizeEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t offerSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t offerSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &offerSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UnderlyingSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t underlyingSecurityIDId() SBE_NOEXCEPT + { + return 309; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteEntries "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 36, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("BidPx": )"; + builder << writer.bidPx(); + + builder << ", "; + builder << R"("OfferPx": )"; + builder << writer.offerPx(); + + builder << ", "; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("BidSize": )"; + builder << +writer.bidSize(); + + builder << ", "; + builder << R"("OfferSize": )"; + builder << +writer.offerSize(); + + builder << ", "; + builder << R"("UnderlyingSecurityID": )"; + builder << +writer.underlyingSecurityID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MassQuote517 _writer) +{ + MassQuote517 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MassQuote517", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("Reserved": )"; + builder << '"' << + writer.getReservedAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noQuoteEntries().forEach([](NoQuoteEntries e) + { + e.skip(); + }); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoQuoteEntries::sbeHeaderSize(); + if (NoQuoteEntriesLength > 254) + { + throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]"); + } + length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h b/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h new file mode 100644 index 000000000..0a46eb1cf --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h @@ -0,0 +1,2897 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTEACK545_H_ +#define _ILINKBINARY_MASSQUOTEACK545_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class MassQuoteAck545 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + MassQuoteAck545() = default; + + MassQuoteAck545( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + MassQuoteAck545(char *buffer, const std::uint64_t bufferLength) : + MassQuoteAck545(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuoteAck545( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuoteAck545(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)350; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)545; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuoteAck545 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuoteAck545(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuoteAck545 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = MassQuoteAck545( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuoteAck545 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MassQuoteAck545(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + MassQuoteAck545 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteAck545 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteAck545 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteAck545 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteAck545 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteAck545 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 288, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 288, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 &requestTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 296, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 304, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 304, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 312, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 312, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 320; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 320; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 320; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 320 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteAck545 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 320 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 320, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteAck545 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 320, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 320; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 320; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 320 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 320 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 325; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 325, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteAck545 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 325, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonId() SBE_NOEXCEPT + { + return 300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MassQuoteAck545 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 331; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MassQuoteAck545 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 331, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteStatusId() SBE_NOEXCEPT + { + return 297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingOffset() SBE_NOEXCEPT + { + return 333; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t)); + return QuoteAckStatus::get((val)); + } + + MassQuoteAck545 "eStatus(const QuoteAckStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 333, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 334; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuoteAck545 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 334, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t noProcessedEntriesId() SBE_NOEXCEPT + { + return 9772; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noProcessedEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noProcessedEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noProcessedEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingOffset() SBE_NOEXCEPT + { + return 335; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t noProcessedEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 335, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteAck545 &noProcessedEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 335, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 336; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteAck545 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 336, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 337; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + MassQuoteAck545 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 337, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 338; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteAck545 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 338, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 339; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuoteAck545 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 339, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 340; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 340, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteAck545 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 340, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 341; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 341, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteAck545 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 341, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 342; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 342, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteAck545 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 342, &val, sizeof(std::uint64_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)11); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 11; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteEntries "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryRejectReasonId() SBE_NOEXCEPT + { + return 368; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryRejectReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryRejectReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 10; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 10, sizeof(std::uint8_t)); + return (val); + } + + NoQuoteEntries "eEntryRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 10, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MassQuoteAck545 _writer) +{ + MassQuoteAck545 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MassQuoteAck545", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("RequestTime": )"; + builder << +writer.requestTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("NoProcessedEntries": )"; + builder << +writer.noProcessedEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noQuoteEntries().forEach([](NoQuoteEntries e) + { + e.skip(); + }); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoQuoteEntries::sbeHeaderSize(); + if (NoQuoteEntriesLength > 254) + { + throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]"); + } + length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h b/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h new file mode 100644 index 000000000..56d06e112 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSORDTYP_H_ +#define _ILINKBINARY_MASSSTATUSORDTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MassStatusOrdTyp +{ +public: + enum Value + { + SenderSubID = (std::uint8_t)100, + Account = (std::uint8_t)101, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum MassStatusOrdTyp [E103]"); + } + + static const char* c_str(const MassStatusOrdTyp::Value value) + { + switch (value) + { + case SenderSubID: return "SenderSubID"; + case Account: return "Account"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusOrdTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassStatusOrdTyp::Value m) + { + return os << MassStatusOrdTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h b/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h new file mode 100644 index 000000000..837ad3087 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSREQTYP_H_ +#define _ILINKBINARY_MASSSTATUSREQTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum MassStatusReqTyp [E103]"); + } + + static const char* c_str(const MassStatusReqTyp::Value value) + { + switch (value) + { + case Instrument: return "Instrument"; + case InstrumentGroup: return "InstrumentGroup"; + case MarketSegment: return "MarketSegment"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusReqTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassStatusReqTyp::Value m) + { + return os << MassStatusReqTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h b/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h new file mode 100644 index 000000000..e2c9e39d1 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSTIF_H_ +#define _ILINKBINARY_MASSSTATUSTIF_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +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 + }; + + 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; + } + + throw std::runtime_error("unknown value for enum MassStatusTIF [E103]"); + } + + static const char* c_str(const MassStatusTIF::Value value) + { + switch (value) + { + case Day: return "Day"; + case GTC: return "GTC"; + case GTD: return "GTD"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusTIF [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MassStatusTIF::Value m) + { + return os << MassStatusTIF::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h b/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h new file mode 100644 index 000000000..73137eaaf --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h @@ -0,0 +1,514 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MATURITYMONTHYEAR_H_ +#define _ILINKBINARY_MATURITYMONTHYEAR_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MaturityMonthYear +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + MaturityMonthYear() = default; + + MaturityMonthYear( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MaturityMonthYear(buffer, 0, bufferLength, actingVersion) + { + } + + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength) : + MaturityMonthYear(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + MaturityMonthYear &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MaturityMonthYear(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t yearId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t yearSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool yearInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= yearSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t yearEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t yearNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t yearMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t yearMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t yearEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t year() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MaturityMonthYear &year(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t monthId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t monthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool monthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= monthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t monthEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint8_t monthNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t monthMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t monthMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t monthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t month() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &month(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t dayId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t daySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool dayInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= daySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dayEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint8_t dayNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t dayMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t dayMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t dayEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t day() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &day(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t weekId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t weekSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool weekInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= weekSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t weekEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint8_t weekNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t weekMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t weekMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t weekEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t week() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &week(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MaturityMonthYear writer) +{ + builder << '{'; + builder << R"("year": )"; + builder << +writer.year(); + + builder << ", "; + builder << R"("month": )"; + builder << +writer.month(); + + builder << ", "; + builder << R"("day": )"; + builder << +writer.day(); + + builder << ", "; + builder << R"("week": )"; + builder << +writer.week(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/MessageHeader.h b/src/lib/orderman/actors/ilink3/generated/MessageHeader.h new file mode 100644 index 000000000..e2af02ebd --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/MessageHeader.h @@ -0,0 +1,514 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MESSAGEHEADER_H_ +#define _ILINKBINARY_MESSAGEHEADER_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class MessageHeader +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + MessageHeader() = default; + + MessageHeader( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + MessageHeader( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MessageHeader(buffer, 0, bufferLength, actingVersion) + { + } + + MessageHeader( + char *buffer, + const std::uint64_t bufferLength) : + MessageHeader(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + MessageHeader &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MessageHeader(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t blockLengthId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= blockLengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &blockLength(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t templateIdId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t templateIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool templateIdInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= templateIdSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t templateIdEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t templateIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t templateIdMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t templateIdMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t templateIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t templateId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &templateId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t schemaIdId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t schemaIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool schemaIdInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= schemaIdSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t schemaIdEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t schemaIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t schemaId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &schemaId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t versionId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t versionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool versionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= versionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t versionEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint16_t versionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t versionMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t versionMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t versionEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t version() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &version(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint16_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MessageHeader writer) +{ + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); + + builder << ", "; + builder << R"("templateId": )"; + builder << +writer.templateId(); + + builder << ", "; + builder << R"("schemaId": )"; + builder << +writer.schemaId(); + + builder << ", "; + builder << R"("version": )"; + builder << +writer.version(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Negotiate500.h b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h new file mode 100644 index 000000000..6414c672a --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h @@ -0,0 +1,1833 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATE500_H_ +#define _ILINKBINARY_NEGOTIATE500_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class Negotiate500 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Negotiate500() = default; + + Negotiate500( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + Negotiate500(char *buffer, const std::uint64_t bufferLength) : + Negotiate500(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Negotiate500( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Negotiate500(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)76; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)500; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Negotiate"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Negotiate500 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Negotiate500(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Negotiate500 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = Negotiate500( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Negotiate500 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Negotiate500(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + Negotiate500 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * CustomerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t customerFlowId() SBE_NOEXCEPT + { + return 39000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t customerFlowSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool customerFlowInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= customerFlowSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t customerFlowEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char customerFlowNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char customerFlowMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char customerFlowMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t customerFlowEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t customerFlowLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *customerFlow() const + { + static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + + 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 }; + + return (char)customerFlowValues[index]; + } + + std::uint64_t getCustomerFlow(char *dst, const std::uint64_t length) const + { + 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(bytesToCopy)); + return bytesToCopy; + } + + std::string getCustomerFlowAsString() const + { + static const std::uint8_t CustomerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + + return std::string((const char *)CustomerFlowValues, 10); + } + + std::string getCustomerFlowAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCustomerFlowAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hMACVersionId() SBE_NOEXCEPT + { + return 39003; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACVersionEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t hMACVersionLength() SBE_NOEXCEPT + { + return 13; + } + + 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 }; + + 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 }; + + return (char)hMACVersionValues[index]; + } + + std::uint64_t getHMACVersion(char *dst, const std::uint64_t length) const + { + 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(bytesToCopy)); + return bytesToCopy; + } + + std::string getHMACVersionAsString() const + { + static const std::uint8_t HMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return std::string((const char *)HMACVersionValues, 13); + } + + std::string getHMACVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACVersionAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t hMACSignatureId() SBE_NOEXCEPT + { + return 39005; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACSignatureSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACSignatureInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACSignatureSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACSignatureEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t hMACSignatureLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD const char *hMACSignature() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *hMACSignature() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char hMACSignature(const std::uint64_t index) const + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &hMACSignature(const std::uint64_t index, const char value) + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getHMACSignature(char *const dst, const std::uint64_t length) const + { + if (length > 32) + { + throw std::runtime_error("length too large for getHMACSignature [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putHMACSignature(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 32); + return *this; + } + + SBE_NODISCARD std::string getHMACSignatureAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getHMACSignatureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACSignatureAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putHMACSignature(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putHMACSignature(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t accessKeyIDId() SBE_NOEXCEPT + { + return 39004; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t accessKeyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool accessKeyIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= accessKeyIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t accessKeyIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t accessKeyIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *accessKeyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char *accessKeyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char accessKeyID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 32 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &accessKeyID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 32 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAccessKeyID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAccessKeyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putAccessKeyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 32, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getAccessKeyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAccessKeyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAccessKeyIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putAccessKeyID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putAccessKeyID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 52, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Negotiate500 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 52, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Negotiate500 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sessionId() SBE_NOEXCEPT + { + return 39006; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sessionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sessionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sessionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sessionEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sessionLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *session() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 68; + } + + SBE_NODISCARD char *session() SBE_NOEXCEPT + { + return m_buffer + m_offset + 68; + } + + SBE_NODISCARD char session(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 68 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &session(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 68 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSession(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSession [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 68, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putSession(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 68, src, sizeof(char) * 3); + return *this; + } + + Negotiate500 &putSession( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 68, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 69, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 70, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getSessionAsString() const + { + const char *buffer = m_buffer + m_offset + 68; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSessionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSessionAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSessionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 68; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putSession(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 68 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putSession(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 68 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t firmId() SBE_NOEXCEPT + { + return 39007; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t firmSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool firmInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= firmSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t firmEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t firmLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *firm() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char *firm() SBE_NOEXCEPT + { + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char firm(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 71 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &firm(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 71 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFirm(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getFirm [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 71, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putFirm(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 71, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getFirmAsString() const + { + const char *buffer = m_buffer + m_offset + 71; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFirmAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFirmAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFirmAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 71; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putFirm(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putFirm(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + Negotiate500 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + if (length != std::uint16_t(0)) + { + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + } + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + Negotiate500 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + + #if __cplusplus >= 201703L + Negotiate500 &putCredentials(const std::string_view str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + #endif + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Negotiate500 _writer) +{ + Negotiate500 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Negotiate500", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("HMACSignature": )"; + builder << '"' << + writer.getHMACSignatureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AccessKeyID": )"; + builder << '"' << + writer.getAccessKeyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("Session": )"; + builder << '"' << + writer.getSessionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Firm": )"; + builder << '"' << + writer.getFirmAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ + skipCredentials(); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += credentialsHeaderLength(); + if (CredentialsLength > 65534) + { + throw std::runtime_error("CredentialsLength too long for length type [E109]"); + } + length += CredentialsLength; + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h b/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h new file mode 100644 index 000000000..035f278fd --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h @@ -0,0 +1,936 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATIONREJECT502_H_ +#define _ILINKBINARY_NEGOTIATIONREJECT502_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class NegotiationReject502 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + NegotiationReject502() = default; + + NegotiationReject502( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + NegotiationReject502(char *buffer, const std::uint64_t bufferLength) : + NegotiationReject502(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NegotiationReject502( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NegotiationReject502(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)502; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NegotiationReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NegotiationReject502 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NegotiationReject502(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NegotiationReject502 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = NegotiationReject502( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NegotiationReject502 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = NegotiationReject502(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + NegotiationReject502 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NegotiationReject502 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NegotiationReject502 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + SBE_NODISCARD std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NegotiationReject502 &putReason(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NegotiationReject502 &putReason(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationReject502 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationReject502 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NegotiationReject502 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + NegotiationReject502 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NegotiationReject502 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NegotiationReject502 _writer) +{ + NegotiationReject502 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NegotiationReject502", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h new file mode 100644 index 000000000..e3cd03bf4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h @@ -0,0 +1,1194 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATIONRESPONSE501_H_ +#define _ILINKBINARY_NEGOTIATIONRESPONSE501_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class NegotiationResponse501 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + NegotiationResponse501() = default; + + NegotiationResponse501( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + NegotiationResponse501(char *buffer, const std::uint64_t bufferLength) : + NegotiationResponse501(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NegotiationResponse501( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NegotiationResponse501(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)501; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NegotiationResponse"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NegotiationResponse501 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NegotiationResponse501(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NegotiationResponse501 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = NegotiationResponse501( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NegotiationResponse501 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = NegotiationResponse501(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + NegotiationResponse501 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * ServerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t serverFlowId() SBE_NOEXCEPT + { + return 39009; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t serverFlowSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool serverFlowInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= serverFlowSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t serverFlowEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char serverFlowNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char serverFlowMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char serverFlowMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t serverFlowEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t serverFlowLength() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD const char *serverFlow() const + { + static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + + 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 }; + + return (char)serverFlowValues[index]; + } + + std::uint64_t getServerFlow(char *dst, const std::uint64_t length) const + { + 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(bytesToCopy)); + return bytesToCopy; + } + + std::string getServerFlowAsString() const + { + static const std::uint8_t ServerFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + + return std::string((const char *)ServerFlowValues, 11); + } + + std::string getServerFlowAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getServerFlowAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationResponse501 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationResponse501 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationId() SBE_NOEXCEPT + { + return 39022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secretKeySecureIDExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secretKeySecureIDExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secretKeySecureIDExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t secretKeySecureIDExpiration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NegotiationResponse501 &secretKeySecureIDExpiration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + NegotiationResponse501 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NegotiationResponse501 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t previousSeqNoId() SBE_NOEXCEPT + { + return 39021; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t previousSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NegotiationResponse501 &previousSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t previousUUIDId() SBE_NOEXCEPT + { + return 39015; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousUUIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t previousUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationResponse501 &previousUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + NegotiationResponse501 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + if (length != std::uint16_t(0)) + { + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + } + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + NegotiationResponse501 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + + #if __cplusplus >= 201703L + NegotiationResponse501 &putCredentials(const std::string_view str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + return putCredentials(str.data(), static_cast(str.length())); } + #endif + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NegotiationResponse501 _writer) +{ + NegotiationResponse501 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NegotiationResponse501", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("SecretKeySecureIDExpiration": )"; + builder << +writer.secretKeySecureIDExpiration(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("PreviousSeqNo": )"; + builder << +writer.previousSeqNo(); + + builder << ", "; + builder << R"("PreviousUUID": )"; + builder << +writer.previousUUID(); + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ + skipCredentials(); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += credentialsHeaderLength(); + if (CredentialsLength > 65534) + { + throw std::runtime_error("CredentialsLength too long for length type [E109]"); + } + length += CredentialsLength; + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h b/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h new file mode 100644 index 000000000..9f8a482e7 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h @@ -0,0 +1,2473 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEWORDERCROSS544_H_ +#define _ILINKBINARY_NEWORDERCROSS544_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class NewOrderCross544 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + NewOrderCross544() = default; + + NewOrderCross544( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + NewOrderCross544(char *buffer, const std::uint64_t bufferLength) : + NewOrderCross544(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NewOrderCross544( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NewOrderCross544(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)544; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "c"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NewOrderCross544 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NewOrderCross544(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NewOrderCross544 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = NewOrderCross544( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NewOrderCross544 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = NewOrderCross544(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + NewOrderCross544 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + NewOrderCross544 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderCross544 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderCross544 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderCross544 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderCross544 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + NewOrderCross544 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char ordTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordType() const + { + static const std::uint8_t ordTypeValues[] = { 50 }; + + return (const char *)ordTypeValues; + } + + SBE_NODISCARD char ordType(const std::uint64_t index) const + { + static const std::uint8_t ordTypeValues[] = { 50 }; + + return (char)ordTypeValues[index]; + } + + std::uint64_t getOrdType(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordTypeValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(ordTypeValues) ? length : sizeof(ordTypeValues); + + std::memcpy(dst, ordTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdTypeAsString() const + { + static const std::uint8_t OrdTypeValues[] = { 50 }; + + return std::string((const char *)OrdTypeValues, 1); + } + + std::string getOrdTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char crossTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char crossTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char crossTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *crossType() const + { + static const std::uint8_t crossTypeValues[] = { 51 }; + + return (const char *)crossTypeValues; + } + + SBE_NODISCARD char crossType(const std::uint64_t index) const + { + static const std::uint8_t crossTypeValues[] = { 51 }; + + return (char)crossTypeValues[index]; + } + + std::uint64_t getCrossType(char *dst, const std::uint64_t length) const + { + static std::uint8_t crossTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(crossTypeValues) ? length : sizeof(crossTypeValues); + + std::memcpy(dst, crossTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCrossTypeAsString() const + { + static const std::uint8_t CrossTypeValues[] = { 51 }; + + return std::string((const char *)CrossTypeValues, 1); + } + + std::string getCrossTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCrossTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * CrossPrioritizationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossPrioritizationId() SBE_NOEXCEPT + { + return 550; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossPrioritizationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossPrioritizationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossPrioritizationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossPrioritizationEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char crossPrioritizationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char crossPrioritizationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char crossPrioritizationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t crossPrioritizationEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossPrioritizationLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *crossPrioritization() const + { + static const std::uint8_t crossPrioritizationValues[] = { 48 }; + + return (const char *)crossPrioritizationValues; + } + + SBE_NODISCARD char crossPrioritization(const std::uint64_t index) const + { + static const std::uint8_t crossPrioritizationValues[] = { 48 }; + + return (char)crossPrioritizationValues[index]; + } + + std::uint64_t getCrossPrioritization(char *dst, const std::uint64_t length) const + { + static std::uint8_t crossPrioritizationValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(crossPrioritizationValues) ? length : sizeof(crossPrioritizationValues); + + std::memcpy(dst, crossPrioritizationValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCrossPrioritizationAsString() const + { + static const std::uint8_t CrossPrioritizationValues[] = { 48 }; + + return std::string((const char *)CrossPrioritizationValues, 1); + } + + std::string getCrossPrioritizationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCrossPrioritizationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 41, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * TransBkdTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transBkdTimeId() SBE_NOEXCEPT + { + return 483; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transBkdTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transBkdTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transBkdTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transBkdTimeEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transBkdTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transBkdTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 49, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &transBkdTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 49, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 57; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 57, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 57, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderCross544 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderCross544 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderCross544 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 65 + start] = 0; + } + + return *this; + } + #else + NewOrderCross544 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 65 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderCross544 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::int32_t)); + return *this; + } + + class NoSides + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)34); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 34; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 34; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoSides &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= clOrdIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoSides &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoSides &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoSides &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoSides &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoSides &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoSides &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoSides &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTimeInForceId() SBE_NOEXCEPT + { + return 962; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTimeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTimeInForceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideTimeInForceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTimeInForceEncodingOffset() SBE_NOEXCEPT + { + return 33; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTimeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideTimeInForce::Value sideTimeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 33, sizeof(std::uint8_t)); + return SideTimeInForce::get((val)); + } + + NoSides &sideTimeInForce(const SideTimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 33, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoSides writer) + { + builder << '{'; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SideTimeInForce": )"; + builder << '"' << writer.sideTimeInForce() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoSides m_noSides; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoSidesId() SBE_NOEXCEPT + { + return 552; + } + + SBE_NODISCARD inline NoSides &noSides() + { + m_noSides.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noSides; + } + + NoSides &noSidesCount(const std::uint8_t count) + { + m_noSides.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noSides; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noSidesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noSidesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noSidesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NewOrderCross544 _writer) +{ + NewOrderCross544 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NewOrderCross544", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("TransBkdTime": )"; + builder << +writer.transBkdTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoSides": [)"; + writer.noSides().forEach([&](NoSides& noSides) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noSides; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noSides().forEach([](NoSides e) + { + e.skip(); + }); +} + +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) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoSides::sbeHeaderSize(); + if (NoSidesLength > 254) + { + throw std::runtime_error("NoSidesLength outside of allowed range [E110]"); + } + length += NoSidesLength * NoSides::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h b/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h new file mode 100644 index 000000000..fb41bc3cb --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h @@ -0,0 +1,2326 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEWORDERSINGLE514_H_ +#define _ILINKBINARY_NEWORDERSINGLE514_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class NewOrderSingle514 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + NewOrderSingle514() = default; + + NewOrderSingle514( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + NewOrderSingle514(char *buffer, const std::uint64_t bufferLength) : + NewOrderSingle514(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NewOrderSingle514( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NewOrderSingle514(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)116; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)514; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "D"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NewOrderSingle514 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NewOrderSingle514(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NewOrderSingle514 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = NewOrderSingle514( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NewOrderSingle514 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = NewOrderSingle514(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + NewOrderSingle514 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NewOrderSingle514 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderSingle514 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderSingle514 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderSingle514 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderSingle514 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 77; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 77, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 77, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 85; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 85, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 93; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 93; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 93; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 93 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderSingle514 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 93 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 93, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderSingle514 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 93, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 93; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 93; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 93 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 93 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 98; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 98, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 98, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 102; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 106; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 106, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NewOrderSingle514 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 106, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 108; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderTypeReq::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(char)); + return OrderTypeReq::get((val)); + } + + NewOrderSingle514 &ordType(const OrderTypeReq::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 109; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + NewOrderSingle514 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + NewOrderSingle514 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 111; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 112; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 112, sizeof(char)); + return ExecMode::get((val)); + } + + NewOrderSingle514 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 112, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 113; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 113, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + NewOrderSingle514 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 113, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 114; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + NewOrderSingle514 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 114, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 115, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + NewOrderSingle514 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 115, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NewOrderSingle514 _writer) +{ + NewOrderSingle514 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NewOrderSingle514", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/NotApplied513.h b/src/lib/orderman/actors/ilink3/generated/NotApplied513.h new file mode 100644 index 000000000..d590367c8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/NotApplied513.h @@ -0,0 +1,665 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NOTAPPLIED513_H_ +#define _ILINKBINARY_NOTAPPLIED513_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class NotApplied513 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + NotApplied513() = default; + + NotApplied513( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + NotApplied513(char *buffer, const std::uint64_t bufferLength) : + NotApplied513(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NotApplied513( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NotApplied513(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)513; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NotApplied"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NotApplied513 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NotApplied513(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NotApplied513 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = NotApplied513( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NotApplied513 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = NotApplied513(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + NotApplied513 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NotApplied513 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NotApplied513 &fromSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint32_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t msgCountMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t msgCountMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t msgCount() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NotApplied513 &msgCount(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NotApplied513 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NotApplied513 _writer) +{ + NotApplied513 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NotApplied513", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h b/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h new file mode 100644 index 000000000..54b887d97 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_OFMOVERRIDEREQ_H_ +#define _ILINKBINARY_OFMOVERRIDEREQ_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OFMOverrideReq +{ +public: + enum Value + { + Disabled = (std::uint8_t)0, + Enabled = (std::uint8_t)1, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum OFMOverrideReq [E103]"); + } + + static const char* c_str(const OFMOverrideReq::Value value) + { + switch (value) + { + case Disabled: return "Disabled"; + case Enabled: return "Enabled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OFMOverrideReq [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OFMOverrideReq::Value m) + { + return os << OFMOverrideReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h new file mode 100644 index 000000000..e127d9bdb --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDSTATUSTRD_H_ +#define _ILINKBINARY_ORDSTATUSTRD_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrdStatusTrd +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)1, + Filled = (std::uint8_t)2, + NULL_VALUE = (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; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrd [E103]"); + } + + static const char* c_str(const OrdStatusTrd::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrd [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrdStatusTrd::Value m) + { + return os << OrdStatusTrd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h new file mode 100644 index 000000000..b382ded08 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDSTATUSTRDCXL_H_ +#define _ILINKBINARY_ORDSTATUSTRDCXL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrdStatusTrdCxl +{ +public: + enum Value + { + TradeCorrection = (char)71, + TradeCancel = (char)72, + NULL_VALUE = (char)0 + }; + + static OrdStatusTrdCxl::Value get(const char value) + { + switch (value) + { + case 71: return TradeCorrection; + case 72: return TradeCancel; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrdCxl [E103]"); + } + + static const char* c_str(const OrdStatusTrdCxl::Value value) + { + switch (value) + { + case TradeCorrection: return "TradeCorrection"; + case TradeCancel: return "TradeCancel"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrdCxl [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrdStatusTrdCxl::Value m) + { + return os << OrdStatusTrdCxl::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h new file mode 100644 index 000000000..8dae191a7 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h @@ -0,0 +1,2680 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREJECT535_H_ +#define _ILINKBINARY_ORDERCANCELREJECT535_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderCancelReject535 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderCancelReject535() = default; + + OrderCancelReject535( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderCancelReject535(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReject535(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReject535( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReject535(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)535; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "9"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReject535 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReject535(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReject535 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderCancelReject535( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReject535 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderCancelReject535(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderCancelReject535 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReject535 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putExecID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putExecID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 308 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 308 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 328 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 328 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 85 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 85 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlRejResponseToId() SBE_NOEXCEPT + { + return 434; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejResponseToSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejResponseToInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejResponseToSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t cxlRejResponseToLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *cxlRejResponseTo() const + { + static const std::uint8_t cxlRejResponseToValues[] = { 49 }; + + return (const char *)cxlRejResponseToValues; + } + + SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const + { + static const std::uint8_t cxlRejResponseToValues[] = { 49 }; + + return (char)cxlRejResponseToValues[index]; + } + + std::uint64_t getCxlRejResponseTo(char *dst, const std::uint64_t length) const + { + static std::uint8_t cxlRejResponseToValues[] = { 49 }; + std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues); + + std::memcpy(dst, cxlRejResponseToValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCxlRejResponseToAsString() const + { + static const std::uint8_t CxlRejResponseToValues[] = { 49 }; + + return std::string((const char *)CxlRejResponseToValues, 1); + } + + std::string getCxlRejResponseToAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCxlRejResponseToAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 364; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 364, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 364, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 372, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 372, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 380; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 388; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 388 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 388 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 388, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonId() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 393; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t cxlRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 393, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReject535 &cxlRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 393, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 395; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 395, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReject535 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 395, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReject535 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 397, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 398; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderCancelReject535 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 398, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderCancelReject535 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 399, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 400; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReject535 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 400, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 401; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 401, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 401, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderCancelReject535 _writer) +{ + OrderCancelReject535 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReject535", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CxlRejReason": )"; + builder << +writer.cxlRejReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h new file mode 100644 index 000000000..668bb5ed0 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h @@ -0,0 +1,2680 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREPLACEREJECT536_H_ +#define _ILINKBINARY_ORDERCANCELREPLACEREJECT536_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderCancelReplaceReject536 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderCancelReplaceReject536() = default; + + OrderCancelReplaceReject536( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderCancelReplaceReject536(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReplaceReject536(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReplaceReject536( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReplaceReject536(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)536; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "9"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReplaceReject536 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceReject536(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReplaceReject536 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderCancelReplaceReject536( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReplaceReject536 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceReject536(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderCancelReplaceReject536 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceReject536 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putExecID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putExecID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 308 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 308 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 308, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 328 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 328 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 328, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 364; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 364, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 364, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 372, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 372, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 380; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 388; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 388 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 388 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 388, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 388, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonId() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 393; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t cxlRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 393, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceReject536 &cxlRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 393, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 395; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 395, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceReject536 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 395, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 85 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 85 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlRejResponseToId() SBE_NOEXCEPT + { + return 434; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejResponseToSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejResponseToInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejResponseToSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t cxlRejResponseToLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *cxlRejResponseTo() const + { + static const std::uint8_t cxlRejResponseToValues[] = { 50 }; + + return (const char *)cxlRejResponseToValues; + } + + SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const + { + static const std::uint8_t cxlRejResponseToValues[] = { 50 }; + + return (char)cxlRejResponseToValues[index]; + } + + std::uint64_t getCxlRejResponseTo(char *dst, const std::uint64_t length) const + { + static std::uint8_t cxlRejResponseToValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues); + + std::memcpy(dst, cxlRejResponseToValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCxlRejResponseToAsString() const + { + static const std::uint8_t CxlRejResponseToValues[] = { 50 }; + + return std::string((const char *)CxlRejResponseToValues, 1); + } + + std::string getCxlRejResponseToAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCxlRejResponseToAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReplaceReject536 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 397, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 398; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderCancelReplaceReject536 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 398, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderCancelReplaceReject536 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 399, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 400; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceReject536 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 400, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 401; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 401, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 401, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderCancelReplaceReject536 _writer) +{ + OrderCancelReplaceReject536 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReplaceReject536", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CxlRejReason": )"; + builder << +writer.cxlRejReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h new file mode 100644 index 000000000..7767927e3 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h @@ -0,0 +1,2461 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_H_ +#define _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderCancelReplaceRequest515 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderCancelReplaceRequest515() = default; + + OrderCancelReplaceRequest515( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderCancelReplaceRequest515(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReplaceRequest515(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReplaceRequest515( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReplaceRequest515(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)125; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)515; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "G"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReplaceRequest515 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceRequest515(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReplaceRequest515 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderCancelReplaceRequest515( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReplaceRequest515 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceRequest515(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderCancelReplaceRequest515 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(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 priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + OrderCancelReplaceRequest515 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceRequest515 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceRequest515 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceRequest515 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceRequest515 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(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 stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 77; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 77, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 85; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 85, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 85, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 93; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 93, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 93, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 101; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 101; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 101; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 101 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceRequest515 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 101 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 101, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceRequest515 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 101, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 101; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 101; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 101, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 101 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 101, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 101 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 106; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 106, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 106, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 110; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 114; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceRequest515 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 114, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderTypeReq::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(char)); + return OrderTypeReq::get((val)); + } + + OrderCancelReplaceRequest515 &ordType(const OrderTypeReq::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 117, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + OrderCancelReplaceRequest515 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 117, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 118; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 118, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReplaceRequest515 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 118, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OFMOverrideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t oFMOverrideId() SBE_NOEXCEPT + { + return 9768; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t oFMOverrideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool oFMOverrideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= oFMOverrideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t oFMOverrideEncodingOffset() SBE_NOEXCEPT + { + return 119; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t oFMOverrideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OFMOverrideReq::Value oFMOverride() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::uint8_t)); + return OFMOverrideReq::get((val)); + } + + OrderCancelReplaceRequest515 &oFMOverride(const OFMOverrideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 120; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 120, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 121; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 121, sizeof(char)); + return ExecMode::get((val)); + } + + OrderCancelReplaceRequest515 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 121, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 122; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceRequest515 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 122, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 123; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 123, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceRequest515 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 123, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + OrderCancelReplaceRequest515 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderCancelReplaceRequest515 _writer) +{ + OrderCancelReplaceRequest515 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReplaceRequest515", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("OFMOverride": )"; + builder << '"' << writer.oFMOverride() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h new file mode 100644 index 000000000..292539651 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h @@ -0,0 +1,1643 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREQUEST516_H_ +#define _ILINKBINARY_ORDERCANCELREQUEST516_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderCancelRequest516 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderCancelRequest516() = default; + + OrderCancelRequest516( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderCancelRequest516(char *buffer, const std::uint64_t bufferLength) : + OrderCancelRequest516(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelRequest516( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelRequest516(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)88; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)516; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "F"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelRequest516 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelRequest516(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelRequest516 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderCancelRequest516( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelRequest516 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderCancelRequest516(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderCancelRequest516 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelRequest516 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelRequest516 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clOrdIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putClOrdID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putClOrdID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 77; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 77 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 77 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 77, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 82; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 82, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelRequest516 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 82, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 86; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + OrderCancelRequest516 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelRequest516 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderCancelRequest516 _writer) +{ + OrderCancelRequest516 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelRequest516", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderEventType.h b/src/lib/orderman/actors/ilink3/generated/OrderEventType.h new file mode 100644 index 000000000..544c7f78f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderEventType.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDEREVENTTYPE_H_ +#define _ILINKBINARY_ORDEREVENTTYPE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrderEventType +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)4, + Filled = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static OrderEventType::Value get(const std::uint8_t value) + { + switch (value) + { + case 4: return PartiallyFilled; + case 5: return Filled; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderEventType [E103]"); + } + + static const char* c_str(const OrderEventType::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderEventType [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrderEventType::Value m) + { + return os << OrderEventType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport558.h b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport558.h new file mode 100644 index 000000000..99edeca6f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport558.h @@ -0,0 +1,3317 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSACTIONREPORT558_H_ +#define _ILINKBINARY_ORDERMASSACTIONREPORT558_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif +#include +#include +#include +#include + +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderMassActionReport558 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderMassActionReport558() = default; + + OrderMassActionReport558( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderMassActionReport558(char *buffer, const std::uint64_t bufferLength) : + OrderMassActionReport558(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassActionReport558( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassActionReport558(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)103; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)558; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "BZ"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassActionReport558 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassActionReport558(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassActionReport558 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderMassActionReport558( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassActionReport558 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderMassActionReport558(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport558 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionReportIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionReportIDId() SBE_NOEXCEPT + { + return 1369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionReportIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionReportIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionReportIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionReportIDEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massActionReportIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massActionReportID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &massActionReportID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionTypeId() SBE_NOEXCEPT + { + return 1373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionTypeEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char massActionTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char massActionTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char massActionTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t massActionTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t massActionTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *massActionType() const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (const char *)massActionTypeValues; + } + + SBE_NODISCARD char massActionType(const std::uint64_t index) const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (char)massActionTypeValues[index]; + } + + std::uint64_t getMassActionType(char *dst, const std::uint64_t length) const + { + static std::uint8_t massActionTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(massActionTypeValues) ? length : sizeof(massActionTypeValues); + + std::memcpy(dst, massActionTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMassActionTypeAsString() const + { + static const std::uint8_t MassActionTypeValues[] = { 51 }; + + return std::string((const char *)MassActionTypeValues, 1); + } + + std::string getMassActionTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMassActionTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 78; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 78; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 78; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 78 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 78 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 78, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 78, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 78; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 78; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 83; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport558 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderMassActionReport558 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionResponseMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionResponseId() SBE_NOEXCEPT + { + return 1375; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionResponseSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionResponseInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionResponseSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingOffset() SBE_NOEXCEPT + { + return 89; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionResponse::Value massActionResponse() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 89, sizeof(std::uint8_t)); + return MassActionResponse::get((val)); + } + + OrderMassActionReport558 &massActionResponse(const MassActionResponse::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 89, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 90; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassActionReport558 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionScopeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionScopeId() SBE_NOEXCEPT + { + return 1374; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionScopeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionScopeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionScopeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingOffset() SBE_NOEXCEPT + { + return 91; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionScope::Value massActionScope() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 91, sizeof(std::uint8_t)); + return MassActionScope::get((val)); + } + + OrderMassActionReport558 &massActionScope(const MassActionScope::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 91, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalAffectedOrdersMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totalAffectedOrdersId() SBE_NOEXCEPT + { + return 533; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalAffectedOrdersInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalAffectedOrders() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &totalAffectedOrders(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastFragmentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastFragmentId() SBE_NOEXCEPT + { + return 893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastFragmentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastFragmentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastFragmentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingOffset() SBE_NOEXCEPT + { + return 93; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value lastFragment() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 93, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport558 &lastFragment(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 93, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionRejectReasonId() SBE_NOEXCEPT + { + return 1376; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 94; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t massActionRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 94, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &massActionRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 94, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 95; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 95, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 95, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassCancelRequestTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massCancelRequestTypeId() SBE_NOEXCEPT + { + return 6115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massCancelRequestTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massCancelRequestTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massCancelRequestTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingOffset() SBE_NOEXCEPT + { + return 96; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCxlReqTyp::Value massCancelRequestType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 96, sizeof(std::uint8_t)); + return MassCxlReqTyp::get((val)); + } + + OrderMassActionReport558 &massCancelRequestType(const MassCxlReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 96, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 97; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideNULL::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 97, sizeof(std::uint8_t)); + return SideNULL::get((val)); + } + + OrderMassActionReport558 &side(const SideNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 97, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 98; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionOrdTyp::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 98, sizeof(char)); + return MassActionOrdTyp::get((val)); + } + + OrderMassActionReport558 &ordType(const MassActionOrdTyp::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 98, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCancelTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 99, sizeof(std::uint8_t)); + return MassCancelTIF::get((val)); + } + + OrderMassActionReport558 &timeInForce(const MassCancelTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 99, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderMassActionReport558 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 101; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 101, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderMassActionReport558 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 101, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport558 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoAffectedOrders + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = std::numeric_limits::max(); + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)32); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 32; + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index + 1 < m_count; + } + + inline NoAffectedOrders &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrigCIOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origCIOrdIDId() SBE_NOEXCEPT + { + return 41; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origCIOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origCIOrdIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= origCIOrdIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char origCIOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char origCIOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char origCIOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t origCIOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *origCIOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *origCIOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char origCIOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoAffectedOrders &origCIOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigCIOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getOrigCIOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoAffectedOrders &putOrigCIOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + std::string getOrigCIOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigCIOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrigCIOrdIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getOrigCIOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoAffectedOrders &putOrigCIOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoAffectedOrders &putOrigCIOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AffectedOrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t affectedOrderIDId() SBE_NOEXCEPT + { + return 535; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t affectedOrderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool affectedOrderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= affectedOrderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t affectedOrderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoAffectedOrders &affectedOrderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CxlQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlQuantityId() SBE_NOEXCEPT + { + return 84; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlQuantitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlQuantityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= cxlQuantitySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlQuantityEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cxlQuantityEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cxlQuantity() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoAffectedOrders &cxlQuantity(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoAffectedOrders writer) + { + builder << '{'; + builder << R"("OrigCIOrdID": )"; + builder << '"' << + writer.getOrigCIOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AffectedOrderID": )"; + builder << +writer.affectedOrderID(); + + builder << ", "; + builder << R"("CxlQuantity": )"; + builder << +writer.cxlQuantity(); + + builder << '}'; + + return builder; + } + }; + +private: + NoAffectedOrders m_noAffectedOrders; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoAffectedOrdersId() SBE_NOEXCEPT + { + return 534; + } + + SBE_NODISCARD inline NoAffectedOrders &noAffectedOrders() + { + m_noAffectedOrders.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + NoAffectedOrders &noAffectedOrdersCount(const std::uint8_t count) + { + m_noAffectedOrders.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noAffectedOrdersInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderMassActionReport558 _writer) + { + OrderMassActionReport558 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassActionReport558", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("MassActionReportID": )"; + builder << +writer.massActionReportID(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("MassActionResponse": )"; + builder << '"' << writer.massActionResponse() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("MassActionScope": )"; + builder << '"' << writer.massActionScope() << '"'; + + builder << ", "; + builder << R"("TotalAffectedOrders": )"; + builder << +writer.totalAffectedOrders(); + + builder << ", "; + builder << R"("LastFragment": )"; + builder << '"' << writer.lastFragment() << '"'; + + builder << ", "; + builder << R"("MassActionRejectReason": )"; + builder << +writer.massActionRejectReason(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("MassCancelRequestType": )"; + builder << '"' << writer.massCancelRequestType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoAffectedOrders": [)"; + writer.noAffectedOrders().forEach([&](NoAffectedOrders& noAffectedOrders) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noAffectedOrders; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h new file mode 100755 index 000000000..bf7fa68bf --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h @@ -0,0 +1,3388 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSACTIONREPORT562_H_ +#define _ILINKBINARY_ORDERMASSACTIONREPORT562_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderMassActionReport562 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderMassActionReport562() = default; + + OrderMassActionReport562( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderMassActionReport562(char *buffer, const std::uint64_t bufferLength) : + OrderMassActionReport562(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassActionReport562( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassActionReport562(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)114; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "BZ"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassActionReport562 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassActionReport562(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassActionReport562 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderMassActionReport562( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassActionReport562 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderMassActionReport562(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderMassActionReport562 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport562 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport562 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport562 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport562 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport562 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionReportIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionReportIDId() SBE_NOEXCEPT + { + return 1369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionReportIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionReportIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionReportIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionReportIDEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massActionReportIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massActionReportID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &massActionReportID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionTypeId() SBE_NOEXCEPT + { + return 1373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionTypeEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char massActionTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char massActionTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char massActionTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t massActionTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t massActionTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *massActionType() const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (const char *)massActionTypeValues; + } + + SBE_NODISCARD char massActionType(const std::uint64_t index) const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (char)massActionTypeValues[index]; + } + + std::uint64_t getMassActionType(char *dst, const std::uint64_t length) const + { + static std::uint8_t massActionTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(massActionTypeValues) ? length : sizeof(massActionTypeValues); + + std::memcpy(dst, massActionTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMassActionTypeAsString() const + { + static const std::uint8_t MassActionTypeValues[] = { 51 }; + + return std::string((const char *)MassActionTypeValues, 1); + } + + std::string getMassActionTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMassActionTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 72 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport562 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 72 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 72, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport562 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport562 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport562 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 78; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 78; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 78; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 78 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport562 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 78 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 78, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport562 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 78, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 78; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 78; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport562 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport562 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 83; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport562 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderMassActionReport562 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionResponseMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionResponseId() SBE_NOEXCEPT + { + return 1375; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionResponseSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionResponseInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionResponseSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingOffset() SBE_NOEXCEPT + { + return 89; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionResponse::Value massActionResponse() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 89, sizeof(std::uint8_t)); + return MassActionResponse::get((val)); + } + + OrderMassActionReport562 &massActionResponse(const MassActionResponse::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 89, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 90; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassActionReport562 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionScopeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionScopeId() SBE_NOEXCEPT + { + return 1374; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionScopeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionScopeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionScopeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingOffset() SBE_NOEXCEPT + { + return 91; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionScope::Value massActionScope() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 91, sizeof(std::uint8_t)); + return MassActionScope::get((val)); + } + + OrderMassActionReport562 &massActionScope(const MassActionScope::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 91, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalAffectedOrdersMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totalAffectedOrdersId() SBE_NOEXCEPT + { + return 533; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalAffectedOrdersInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint32_t totalAffectedOrdersNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t totalAffectedOrdersMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t totalAffectedOrdersMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t totalAffectedOrders() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport562 &totalAffectedOrders(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastFragmentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastFragmentId() SBE_NOEXCEPT + { + return 893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastFragmentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastFragmentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastFragmentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingOffset() SBE_NOEXCEPT + { + return 96; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value lastFragment() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 96, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport562 &lastFragment(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 96, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionRejectReasonId() SBE_NOEXCEPT + { + return 1376; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 97; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t massActionRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 97, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport562 &massActionRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 97, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 98; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 98, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport562 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 98, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassCancelRequestTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massCancelRequestTypeId() SBE_NOEXCEPT + { + return 6115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massCancelRequestTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massCancelRequestTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massCancelRequestTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingOffset() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCxlReqTyp::Value massCancelRequestType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 99, sizeof(std::uint8_t)); + return MassCxlReqTyp::get((val)); + } + + OrderMassActionReport562 &massCancelRequestType(const MassCxlReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 99, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideNULL::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint8_t)); + return SideNULL::get((val)); + } + + OrderMassActionReport562 &side(const SideNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 101; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionOrdTyp::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 101, sizeof(char)); + return MassActionOrdTyp::get((val)); + } + + OrderMassActionReport562 &ordType(const MassActionOrdTyp::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 101, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCancelTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint8_t)); + return MassCancelTIF::get((val)); + } + + OrderMassActionReport562 &timeInForce(const MassCancelTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 103; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 103, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderMassActionReport562 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 103, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 104; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 104, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderMassActionReport562 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 104, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 105; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 105, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport562 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 105, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 106; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 106, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport562 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 106, &val, sizeof(std::uint64_t)); + return *this; + } + + class NoAffectedOrders + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)32); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 32; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoAffectedOrders &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrigCIOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origCIOrdIDId() SBE_NOEXCEPT + { + return 41; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origCIOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origCIOrdIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= origCIOrdIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char origCIOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char origCIOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char origCIOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t origCIOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *origCIOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *origCIOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char origCIOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoAffectedOrders &origCIOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigCIOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getOrigCIOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoAffectedOrders &putOrigCIOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getOrigCIOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigCIOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrigCIOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigCIOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoAffectedOrders &putOrigCIOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoAffectedOrders &putOrigCIOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AffectedOrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t affectedOrderIDId() SBE_NOEXCEPT + { + return 535; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t affectedOrderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool affectedOrderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= affectedOrderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t affectedOrderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoAffectedOrders &affectedOrderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CxlQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlQuantityId() SBE_NOEXCEPT + { + return 84; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlQuantitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlQuantityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= cxlQuantitySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlQuantityEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cxlQuantityEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cxlQuantity() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoAffectedOrders &cxlQuantity(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoAffectedOrders writer) + { + builder << '{'; + builder << R"("OrigCIOrdID": )"; + builder << '"' << + writer.getOrigCIOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AffectedOrderID": )"; + builder << +writer.affectedOrderID(); + + builder << ", "; + builder << R"("CxlQuantity": )"; + builder << +writer.cxlQuantity(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoAffectedOrders m_noAffectedOrders; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoAffectedOrdersId() SBE_NOEXCEPT + { + return 534; + } + + SBE_NODISCARD inline NoAffectedOrders &noAffectedOrders() + { + m_noAffectedOrders.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + NoAffectedOrders &noAffectedOrdersCount(const std::uint8_t count) + { + m_noAffectedOrders.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noAffectedOrdersInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderMassActionReport562 _writer) +{ + OrderMassActionReport562 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassActionReport562", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("MassActionReportID": )"; + builder << +writer.massActionReportID(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("MassActionResponse": )"; + builder << '"' << writer.massActionResponse() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("MassActionScope": )"; + builder << '"' << writer.massActionScope() << '"'; + + builder << ", "; + builder << R"("TotalAffectedOrders": )"; + builder << +writer.totalAffectedOrders(); + + builder << ", "; + builder << R"("LastFragment": )"; + builder << '"' << writer.lastFragment() << '"'; + + builder << ", "; + builder << R"("MassActionRejectReason": )"; + builder << +writer.massActionRejectReason(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("MassCancelRequestType": )"; + builder << '"' << writer.massCancelRequestType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoAffectedOrders": [)"; + writer.noAffectedOrders().forEach([&](NoAffectedOrders& noAffectedOrders) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noAffectedOrders; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noAffectedOrders().forEach([](NoAffectedOrders e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoAffectedOrdersLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoAffectedOrders::sbeHeaderSize(); + if (NoAffectedOrdersLength > 254) + { + throw std::runtime_error("NoAffectedOrdersLength outside of allowed range [E110]"); + } + length += NoAffectedOrdersLength * NoAffectedOrders::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h b/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h new file mode 100644 index 000000000..c5e644414 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h @@ -0,0 +1,2008 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSACTIONREQUEST529_H_ +#define _ILINKBINARY_ORDERMASSACTIONREQUEST529_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderMassActionRequest529 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderMassActionRequest529() = default; + + OrderMassActionRequest529( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderMassActionRequest529(char *buffer, const std::uint64_t bufferLength) : + OrderMassActionRequest529(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassActionRequest529( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassActionRequest529(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)529; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CA"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassActionRequest529 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassActionRequest529(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassActionRequest529 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderMassActionRequest529( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassActionRequest529 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderMassActionRequest529(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderMassActionRequest529 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionRequest529 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionRequest529 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassActionRequest529 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionRequest529 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MassActionTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionTypeId() SBE_NOEXCEPT + { + return 1373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char massActionTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char massActionTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char massActionTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t massActionTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t massActionTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *massActionType() const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (const char *)massActionTypeValues; + } + + SBE_NODISCARD char massActionType(const std::uint64_t index) const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (char)massActionTypeValues[index]; + } + + std::uint64_t getMassActionType(char *dst, const std::uint64_t length) const + { + static std::uint8_t massActionTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(massActionTypeValues) ? length : sizeof(massActionTypeValues); + + std::memcpy(dst, massActionTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMassActionTypeAsString() const + { + static const std::uint8_t MassActionTypeValues[] = { 51 }; + + return std::string((const char *)MassActionTypeValues, 1); + } + + std::string getMassActionTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMassActionTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionRequest529 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 55; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 55 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 55 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 55, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 55, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionRequest529 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionScopeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massActionScopeId() SBE_NOEXCEPT + { + return 1374; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionScopeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionScopeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionScopeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionScope::Value massActionScope() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint8_t)); + return MassActionScope::get((val)); + } + + OrderMassActionRequest529 &massActionScope(const MassActionScope::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionRequest529 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassCancelRequestTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massCancelRequestTypeId() SBE_NOEXCEPT + { + return 6115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massCancelRequestTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massCancelRequestTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massCancelRequestTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCxlReqTyp::Value massCancelRequestType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return MassCxlReqTyp::get((val)); + } + + OrderMassActionRequest529 &massCancelRequestType(const MassCxlReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideNULL::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return SideNULL::get((val)); + } + + OrderMassActionRequest529 &side(const SideNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionOrdTyp::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(char)); + return MassActionOrdTyp::get((val)); + } + + OrderMassActionRequest529 &ordType(const MassActionOrdTyp::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCancelTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint8_t)); + return MassCancelTIF::get((val)); + } + + OrderMassActionRequest529 &timeInForce(const MassCancelTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderMassActionRequest529 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderMassActionRequest529 _writer) +{ + OrderMassActionRequest529 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassActionRequest529", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MassActionScope": )"; + builder << '"' << writer.massActionScope() << '"'; + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("MassCancelRequestType": )"; + builder << '"' << writer.massCancelRequestType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h b/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h new file mode 100644 index 000000000..8f8522d88 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h @@ -0,0 +1,1703 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSSTATUSREQUEST530_H_ +#define _ILINKBINARY_ORDERMASSSTATUSREQUEST530_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderMassStatusRequest530 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderMassStatusRequest530() = default; + + OrderMassStatusRequest530( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderMassStatusRequest530(char *buffer, const std::uint64_t bufferLength) : + OrderMassStatusRequest530(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassStatusRequest530( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassStatusRequest530(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)530; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "AF"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassStatusRequest530 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassStatusRequest530(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassStatusRequest530 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderMassStatusRequest530( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassStatusRequest530 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderMassStatusRequest530(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderMassStatusRequest530 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassStatusRequest530 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqIDId() SBE_NOEXCEPT + { + return 584; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassStatusRequest530 &massStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassStatusRequest530 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassStatusRequest530 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassStatusRequest530 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassStatusRequest530 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassStatusRequest530 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassStatusRequest530 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassStatusRequest530 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 55; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 55 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassStatusRequest530 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 55 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 55, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassStatusRequest530 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 55, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassStatusRequest530 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MassStatusReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqTypeId() SBE_NOEXCEPT + { + return 585; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusReqTyp::Value massStatusReqType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint8_t)); + return MassStatusReqTyp::get((val)); + } + + OrderMassStatusRequest530 &massStatusReqType(const MassStatusReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqTypeId() SBE_NOEXCEPT + { + return 5000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusOrdTyp::Value ordStatusReqType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(std::uint8_t)); + return MassStatusOrdTyp::get((val)); + } + + OrderMassStatusRequest530 &ordStatusReqType(const MassStatusOrdTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return MassStatusTIF::get((val)); + } + + OrderMassStatusRequest530 &timeInForce(const MassStatusTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return (val); + } + + OrderMassStatusRequest530 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderMassStatusRequest530 _writer) +{ + OrderMassStatusRequest530 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassStatusRequest530", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("MassStatusReqID": )"; + builder << +writer.massStatusReqID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MassStatusReqType": )"; + builder << '"' << writer.massStatusReqType() << '"'; + + builder << ", "; + builder << R"("OrdStatusReqType": )"; + builder << '"' << writer.ordStatusReqType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderStatus.h b/src/lib/orderman/actors/ilink3/generated/OrderStatus.h new file mode 100644 index 000000000..72c91a521 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderStatus.h @@ -0,0 +1,159 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERSTATUS_H_ +#define _ILINKBINARY_ORDERSTATUS_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrderStatus +{ +public: + enum Value + { + New = (char)48, + PartiallyFilled = (char)49, + Filled = (char)50, + Cancelled = (char)52, + Replaced = (char)53, + Rejected = (char)56, + Expired = (char)67, + Undefined = (char)85, + NULL_VALUE = (char)0 + }; + + static OrderStatus::Value get(const char value) + { + switch (value) + { + case 48: return New; + case 49: return PartiallyFilled; + case 50: return Filled; + case 52: return Cancelled; + case 53: return Replaced; + case 56: return Rejected; + case 67: return Expired; + case 85: return Undefined; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderStatus [E103]"); + } + + static const char* c_str(const OrderStatus::Value value) + { + switch (value) + { + case New: return "New"; + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case Cancelled: return "Cancelled"; + case Replaced: return "Replaced"; + case Rejected: return "Rejected"; + case Expired: return "Expired"; + case Undefined: return "Undefined"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderStatus [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrderStatus::Value m) + { + return os << OrderStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h b/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h new file mode 100644 index 000000000..180445f12 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h @@ -0,0 +1,1237 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERSTATUSREQUEST533_H_ +#define _ILINKBINARY_ORDERSTATUSREQUEST533_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class OrderStatusRequest533 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + OrderStatusRequest533() = default; + + OrderStatusRequest533( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + OrderStatusRequest533(char *buffer, const std::uint64_t bufferLength) : + OrderStatusRequest533(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderStatusRequest533( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderStatusRequest533(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)62; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)533; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "H"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderStatusRequest533 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderStatusRequest533(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderStatusRequest533 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = OrderStatusRequest533( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderStatusRequest533 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = OrderStatusRequest533(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + OrderStatusRequest533 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqIDId() SBE_NOEXCEPT + { + return 790; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t ordStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &ordStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderStatusRequest533 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderStatusRequest533 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + OrderStatusRequest533 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + OrderStatusRequest533 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderStatusRequest533 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderStatusRequest533 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 49, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 49, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 57; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 57 + (index * 1), sizeof(char)); + return (val); + } + + OrderStatusRequest533 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 57 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 57, sizeof(char) * static_cast(length)); + return length; + } + + OrderStatusRequest533 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 57, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderStatusRequest533 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #else + OrderStatusRequest533 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #endif + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, OrderStatusRequest533 _writer) +{ + OrderStatusRequest533 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderStatusRequest533", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrdStatusReqID": )"; + builder << +writer.ordStatusReqID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderType.h b/src/lib/orderman/actors/ilink3/generated/OrderType.h new file mode 100644 index 000000000..4f7dc868b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderType.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERTYPE_H_ +#define _ILINKBINARY_ORDERTYPE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrderType +{ +public: + enum Value + { + MarketWithProtection = (char)49, + Limit = (char)50, + StopLimit = (char)52, + MarketWithLeftoverAsLimit = (char)75, + NULL_VALUE = (char)0 + }; + + static OrderType::Value get(const char value) + { + switch (value) + { + case 49: return MarketWithProtection; + case 50: return Limit; + case 52: return StopLimit; + case 75: return MarketWithLeftoverAsLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderType [E103]"); + } + + static const char* c_str(const OrderType::Value value) + { + switch (value) + { + case MarketWithProtection: return "MarketWithProtection"; + case Limit: return "Limit"; + case StopLimit: return "StopLimit"; + case MarketWithLeftoverAsLimit: return "MarketWithLeftoverAsLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderType [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrderType::Value m) + { + return os << OrderType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h b/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h new file mode 100644 index 000000000..4ffa3cbb8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERTYPEREQ_H_ +#define _ILINKBINARY_ORDERTYPEREQ_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class OrderTypeReq +{ +public: + enum Value + { + MarketwithProtection = (char)49, + Limit = (char)50, + StopwithProtection = (char)51, + StopLimit = (char)52, + MarketWithLeftoverAsLimit = (char)75, + NULL_VALUE = (char)0 + }; + + static OrderTypeReq::Value get(const char value) + { + switch (value) + { + case 49: return MarketwithProtection; + case 50: return Limit; + case 51: return StopwithProtection; + case 52: return StopLimit; + case 75: return MarketWithLeftoverAsLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderTypeReq [E103]"); + } + + static const char* c_str(const OrderTypeReq::Value value) + { + switch (value) + { + case MarketwithProtection: return "MarketwithProtection"; + case Limit: return "Limit"; + case StopwithProtection: return "StopwithProtection"; + case StopLimit: return "StopLimit"; + case MarketWithLeftoverAsLimit: return "MarketWithLeftoverAsLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderTypeReq [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrderTypeReq::Value m) + { + return os << OrderTypeReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PRICE9.h b/src/lib/orderman/actors/ilink3/generated/PRICE9.h new file mode 100644 index 000000000..7cddcc346 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PRICE9.h @@ -0,0 +1,353 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PRICE9_H_ +#define _ILINKBINARY_PRICE9_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class PRICE9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PRICE9() = default; + + PRICE9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + PRICE9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICE9(buffer, 0, bufferLength, actingVersion) + { + } + + PRICE9( + char *buffer, + const std::uint64_t bufferLength) : + PRICE9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + PRICE9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICE9(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PRICE9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return (std::int8_t)-9; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICE9 writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h b/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h new file mode 100644 index 000000000..4fefdd6df --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h @@ -0,0 +1,353 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PRICENULL9_H_ +#define _ILINKBINARY_PRICENULL9_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class PRICENULL9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PRICENULL9() = default; + + PRICENULL9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICENULL9(buffer, 0, bufferLength, actingVersion) + { + } + + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength) : + PRICENULL9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + PRICENULL9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICENULL9(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PRICENULL9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return (std::int8_t)-9; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICENULL9 writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << '}'; + + return builder; +} + +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h new file mode 100644 index 000000000..89a2f307b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILROLE_H_ +#define _ILINKBINARY_PARTYDETAILROLE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class PartyDetailRole +{ +public: + enum Value + { + ExecutingFirm = (std::uint16_t)1, + CustomerAccount = (std::uint16_t)24, + TakeUpFirm = (std::uint16_t)96, + Operator = (std::uint16_t)118, + TakeUpAccount = (std::uint16_t)1000, + NULL_VALUE = (std::uint16_t)65535 + }; + + static PartyDetailRole::Value get(const std::uint16_t value) + { + switch (value) + { + case 1: return ExecutingFirm; + case 24: return CustomerAccount; + case 96: return TakeUpFirm; + case 118: return Operator; + case 1000: return TakeUpAccount; + case 65535: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum PartyDetailRole [E103]"); + } + + static const char* c_str(const PartyDetailRole::Value value) + { + switch (value) + { + case ExecutingFirm: return "ExecutingFirm"; + case CustomerAccount: return "CustomerAccount"; + case TakeUpFirm: return "TakeUpFirm"; + case Operator: return "Operator"; + case TakeUpAccount: return "TakeUpAccount"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum PartyDetailRole [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, PartyDetailRole::Value m) + { + return os << PartyDetailRole::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h new file mode 100644 index 000000000..9aec29169 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h @@ -0,0 +1,2850 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_H_ +#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class PartyDetailsDefinitionRequest518 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PartyDetailsDefinitionRequest518() = default; + + PartyDetailsDefinitionRequest518( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + PartyDetailsDefinitionRequest518(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsDefinitionRequest518(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsDefinitionRequest518( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsDefinitionRequest518(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)147; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)518; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CX"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsDefinitionRequest518 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequest518(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequest518 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = PartyDetailsDefinitionRequest518( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequest518 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequest518(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + PartyDetailsDefinitionRequest518 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ListUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t listUpdateActionId() SBE_NOEXCEPT + { + return 1324; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t listUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool listUpdateActionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= listUpdateActionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ListUpdAct::Value listUpdateAction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(char)); + return ListUpdAct::get((val)); + } + + PartyDetailsDefinitionRequest518 &listUpdateAction(const ListUpdAct::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + PartyDetailsDefinitionRequest518 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MemoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t memoId() SBE_NOEXCEPT + { + return 5149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t memoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool memoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= memoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t memoEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char memoNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char memoMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char memoMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t memoEncodingLength() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t memoLength() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD const char *memo() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *memo() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char memo(const std::uint64_t index) const + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequest518 &memo(const std::uint64_t index, const char value) + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMemo(char *const dst, const std::uint64_t length) const + { + if (length > 75) + { + throw std::runtime_error("length too large for getMemo [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequest518 &putMemo(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 75); + return *this; + } + + SBE_NODISCARD std::string getMemoAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMemoAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMemoAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getMemoAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequest518 &putMemo(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequest518 &putMemo(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 96; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 96; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 96; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 96 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequest518 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 96 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 96, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 96, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 96; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 96; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 96, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 96 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 96, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 96 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsDefinitionRequest518 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 125, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsDefinitionRequest518 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 125, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 126; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 126, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsDefinitionRequest518 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 126, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 127; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 127, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsDefinitionRequest518 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 127, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 128; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 128, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsDefinitionRequest518 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 128, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 129; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 129, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsDefinitionRequest518 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 129, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 130; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 130, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsDefinitionRequest518 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 130, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 131; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 131, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 131, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 139, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 139, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NoPartyUpdatesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t noPartyUpdatesId() SBE_NOEXCEPT + { + return 1676; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyUpdatesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyUpdatesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyUpdatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingOffset() SBE_NOEXCEPT + { + return 147; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t noPartyUpdates() SBE_NOEXCEPT + { + return (std::uint8_t)1; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoPartyDetails &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoTrdRegPublications &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PartyDetailsDefinitionRequest518 _writer) +{ + PartyDetailsDefinitionRequest518 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsDefinitionRequest518", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ListUpdateAction": )"; + builder << '"' << writer.listUpdateAction() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("Memo": )"; + builder << '"' << + writer.getMemoAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noPartyDetails().forEach([](NoPartyDetails e) + { + e.skip(); + }); + noTrdRegPublications().forEach([](NoTrdRegPublications e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoPartyDetailsLength = 0, + std::size_t NoTrdRegPublicationsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoPartyDetails::sbeHeaderSize(); + if (NoPartyDetailsLength > 254) + { + throw std::runtime_error("NoPartyDetailsLength outside of allowed range [E110]"); + } + length += NoPartyDetailsLength * NoPartyDetails::sbeBlockLength(); + + length += NoTrdRegPublications::sbeHeaderSize(); + if (NoTrdRegPublicationsLength > 254) + { + throw std::runtime_error("NoTrdRegPublicationsLength outside of allowed range [E110]"); + } + length += NoTrdRegPublicationsLength * NoTrdRegPublications::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h new file mode 100644 index 000000000..166c33fe7 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h @@ -0,0 +1,3195 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_H_ +#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class PartyDetailsDefinitionRequestAck519 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PartyDetailsDefinitionRequestAck519() = default; + + PartyDetailsDefinitionRequestAck519( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + PartyDetailsDefinitionRequestAck519(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsDefinitionRequestAck519(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsDefinitionRequestAck519( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsDefinitionRequestAck519(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)159; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)519; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CY"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsDefinitionRequestAck519 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequestAck519(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequestAck519 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = PartyDetailsDefinitionRequestAck519( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequestAck519 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequestAck519(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + PartyDetailsDefinitionRequestAck519 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + PartyDetailsDefinitionRequestAck519 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MemoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t memoId() SBE_NOEXCEPT + { + return 5149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t memoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool memoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= memoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t memoEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char memoNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char memoMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char memoMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t memoEncodingLength() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t memoLength() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD const char *memo() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *memo() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char memo(const std::uint64_t index) const + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &memo(const std::uint64_t index, const char value) + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMemo(char *const dst, const std::uint64_t length) const + { + if (length > 75) + { + throw std::runtime_error("length too large for getMemo [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequestAck519 &putMemo(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 75); + return *this; + } + + SBE_NODISCARD std::string getMemoAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMemoAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMemoAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getMemoAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequestAck519 &putMemo(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequestAck519 &putMemo(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 87; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 87; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 87 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 87 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 87, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 87, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 87; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 87; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 87, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 87 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 87, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 87 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 107; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 115; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 115, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 115, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 123; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 123, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 123, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailRequestStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRequestStatusId() SBE_NOEXCEPT + { + return 1878; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRequestStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRequestStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailRequestStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRequestStatusEncodingOffset() SBE_NOEXCEPT + { + return 131; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t partyDetailRequestStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t partyDetailRequestStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 131, sizeof(std::uint8_t)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailRequestStatus(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 131, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 133; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 133, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 133, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 134, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 134, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 136; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 137; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 137, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 137, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 138, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 138, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * NoPartyUpdatesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t noPartyUpdatesId() SBE_NOEXCEPT + { + return 1676; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyUpdatesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyUpdatesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyUpdatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t noPartyUpdates() SBE_NOEXCEPT + { + return (std::uint8_t)1; + } + + SBE_NODISCARD static const char * ListUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t listUpdateActionId() SBE_NOEXCEPT + { + return 1324; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t listUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool listUpdateActionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= listUpdateActionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ListUpdAct::Value listUpdateAction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 139, sizeof(char)); + return ListUpdAct::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &listUpdateAction(const ListUpdAct::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 139, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailDefinitionStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailDefinitionStatusId() SBE_NOEXCEPT + { + return 1879; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailDefinitionStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailDefinitionStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailDefinitionStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailDefinitionStatusEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t partyDetailDefinitionStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t partyDetailDefinitionStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint8_t)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailDefinitionStatus(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 141; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 141, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 141, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 149; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 149, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 149, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 158; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 158, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 158, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoPartyDetails &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoTrdRegPublications &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PartyDetailsDefinitionRequestAck519 _writer) +{ + PartyDetailsDefinitionRequestAck519 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsDefinitionRequestAck519", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Memo": )"; + builder << '"' << + writer.getMemoAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("PartyDetailRequestStatus": )"; + builder << +writer.partyDetailRequestStatus(); + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("ListUpdateAction": )"; + builder << '"' << writer.listUpdateAction() << '"'; + + builder << ", "; + builder << R"("PartyDetailDefinitionStatus": )"; + builder << +writer.partyDetailDefinitionStatus(); + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noPartyDetails().forEach([](NoPartyDetails e) + { + e.skip(); + }); + noTrdRegPublications().forEach([](NoTrdRegPublications e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoPartyDetailsLength = 0, + std::size_t NoTrdRegPublicationsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoPartyDetails::sbeHeaderSize(); + if (NoPartyDetailsLength > 254) + { + throw std::runtime_error("NoPartyDetailsLength outside of allowed range [E110]"); + } + length += NoPartyDetailsLength * NoPartyDetails::sbeBlockLength(); + + length += NoTrdRegPublications::sbeHeaderSize(); + if (NoTrdRegPublicationsLength > 254) + { + throw std::runtime_error("NoTrdRegPublicationsLength outside of allowed range [E110]"); + } + length += NoTrdRegPublicationsLength * NoTrdRegPublications::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h new file mode 100644 index 000000000..7286c7fbc --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h @@ -0,0 +1,2982 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSLISTREPORT538_H_ +#define _ILINKBINARY_PARTYDETAILSLISTREPORT538_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class PartyDetailsListReport538 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PartyDetailsListReport538() = default; + + PartyDetailsListReport538( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + PartyDetailsListReport538(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsListReport538(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsListReport538( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsListReport538(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)93; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)538; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CG"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsListReport538 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsListReport538(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsListReport538 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = PartyDetailsListReport538( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsListReport538 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PartyDetailsListReport538(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + PartyDetailsListReport538 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + PartyDetailsListReport538 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsListReport538 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsListReport538 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsListReport538 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + PartyDetailsListReport538 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailsListReportIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReportIDId() SBE_NOEXCEPT + { + return 1510; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReportIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReportIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReportIDEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReportIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReportID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &partyDetailsListReportID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNumPartiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesId() SBE_NOEXCEPT + { + return 1512; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumPartiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNumPartiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNumPartiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumPartiesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t totNumPartiesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t totNumParties() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + PartyDetailsListReport538 &totNumParties(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestResultMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestResultId() SBE_NOEXCEPT + { + return 1511; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestResultSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestResultInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestResultSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestResultEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestResultEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ReqResult::Value requestResult() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return ReqResult::get((val)); + } + + PartyDetailsListReport538 &requestResult(const ReqResult::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastFragmentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastFragmentId() SBE_NOEXCEPT + { + return 893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastFragmentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastFragmentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastFragmentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value lastFragment() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsListReport538 &lastFragment(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsListReport538 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsListReport538 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsListReport538 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsListReport538 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 72, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsListReport538 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 72, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 73; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 73, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsListReport538 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 73, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 74, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsListReport538 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 74, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 75, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 75, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 83; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 91; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 91, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsListReport538 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 91, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + PartyDetailsListReport538 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoPartyDetails &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoTrdRegPublications &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PartyDetailsListReport538 _writer) +{ + PartyDetailsListReport538 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsListReport538", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("PartyDetailsListReportID": )"; + builder << +writer.partyDetailsListReportID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("TotNumParties": )"; + builder << +writer.totNumParties(); + + builder << ", "; + builder << R"("RequestResult": )"; + builder << '"' << writer.requestResult() << '"'; + + builder << ", "; + builder << R"("LastFragment": )"; + builder << '"' << writer.lastFragment() << '"'; + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noPartyDetails().forEach([](NoPartyDetails e) + { + e.skip(); + }); + noTrdRegPublications().forEach([](NoTrdRegPublications e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoPartyDetailsLength = 0, + std::size_t NoTrdRegPublicationsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoPartyDetails::sbeHeaderSize(); + if (NoPartyDetailsLength > 254) + { + throw std::runtime_error("NoPartyDetailsLength outside of allowed range [E110]"); + } + length += NoPartyDetailsLength * NoPartyDetails::sbeBlockLength(); + + length += NoTrdRegPublications::sbeHeaderSize(); + if (NoTrdRegPublicationsLength > 254) + { + throw std::runtime_error("NoTrdRegPublicationsLength outside of allowed range [E110]"); + } + length += NoTrdRegPublicationsLength * NoTrdRegPublications::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h new file mode 100644 index 000000000..ff7556258 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h @@ -0,0 +1,1722 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSLISTREQUEST537_H_ +#define _ILINKBINARY_PARTYDETAILSLISTREQUEST537_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class PartyDetailsListRequest537 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + PartyDetailsListRequest537() = default; + + PartyDetailsListRequest537( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + PartyDetailsListRequest537(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsListRequest537(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsListRequest537( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsListRequest537(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CF"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsListRequest537 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsListRequest537(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsListRequest537 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = PartyDetailsListRequest537( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsListRequest537 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PartyDetailsListRequest537(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + PartyDetailsListRequest537 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListRequest537 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListRequest537 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + PartyDetailsListRequest537 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + class NoRequestingPartyIDs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)7); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 7; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoRequestingPartyIDs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * RequestingPartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyIDId() SBE_NOEXCEPT + { + return 1658; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char requestingPartyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyIDEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t requestingPartyIDLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *requestingPartyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *requestingPartyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char requestingPartyID(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for requestingPartyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyID(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for requestingPartyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRequestingPartyID(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getRequestingPartyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoRequestingPartyIDs &putRequestingPartyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getRequestingPartyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRequestingPartyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRequestingPartyIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getRequestingPartyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoRequestingPartyIDs &putRequestingPartyID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putRequestingPartyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoRequestingPartyIDs &putRequestingPartyID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putRequestingPartyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * RequestingPartyIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyIDSourceId() SBE_NOEXCEPT + { + return 1659; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyIDSourceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char requestingPartyIDSource() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyIDSource(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * RequestingPartyRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyRoleId() SBE_NOEXCEPT + { + return 1660; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyRoleEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR char requestingPartyRoleNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyRoleMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyRoleMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyRoleEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char requestingPartyRole() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyRole(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoRequestingPartyIDs writer) + { + builder << '{'; + builder << R"("RequestingPartyID": )"; + builder << '"' << + writer.getRequestingPartyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("RequestingPartyIDSource": )"; + if (std::isprint(writer.requestingPartyIDSource())) + { + builder << '"' << (char)writer.requestingPartyIDSource() << '"'; + } + else + { + builder << (int)writer.requestingPartyIDSource(); + } + + builder << ", "; + builder << R"("RequestingPartyRole": )"; + if (std::isprint(writer.requestingPartyRole())) + { + builder << '"' << (char)writer.requestingPartyRole() << '"'; + } + else + { + builder << (int)writer.requestingPartyRole(); + } + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoRequestingPartyIDs m_noRequestingPartyIDs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRequestingPartyIDsId() SBE_NOEXCEPT + { + return 1657; + } + + SBE_NODISCARD inline NoRequestingPartyIDs &noRequestingPartyIDs() + { + m_noRequestingPartyIDs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRequestingPartyIDs; + } + + NoRequestingPartyIDs &noRequestingPartyIDsCount(const std::uint8_t count) + { + m_noRequestingPartyIDs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRequestingPartyIDs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRequestingPartyIDsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noRequestingPartyIDsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noRequestingPartyIDsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoPartyIDs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)11); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 11; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoPartyIDs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyIDId() SBE_NOEXCEPT + { + return 448; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoPartyIDs &partyID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyIDSourceId() SBE_NOEXCEPT + { + return 447; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char partyIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyIDSourceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char partyIDSource() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(char)); + return (val); + } + + NoPartyIDs &partyIDSource(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * PartyRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyRoleId() SBE_NOEXCEPT + { + return 452; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyRoleEncodingOffset() SBE_NOEXCEPT + { + return 9; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t partyRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t partyRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 9, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoPartyIDs &partyRole(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 9, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoPartyIDs writer) + { + builder << '{'; + builder << R"("PartyID": )"; + builder << +writer.partyID(); + + builder << ", "; + builder << R"("PartyIDSource": )"; + if (std::isprint(writer.partyIDSource())) + { + builder << '"' << (char)writer.partyIDSource() << '"'; + } + else + { + builder << (int)writer.partyIDSource(); + } + + builder << ", "; + builder << R"("PartyRole": )"; + builder << +writer.partyRole(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoPartyIDs m_noPartyIDs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyIDsId() SBE_NOEXCEPT + { + return 453; + } + + SBE_NODISCARD inline NoPartyIDs &noPartyIDs() + { + m_noPartyIDs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyIDs; + } + + NoPartyIDs &noPartyIDsCount(const std::uint8_t count) + { + m_noPartyIDs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyIDs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyIDsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyIDsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyIDsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PartyDetailsListRequest537 _writer) +{ + PartyDetailsListRequest537 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsListRequest537", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRequestingPartyIDs": [)"; + writer.noRequestingPartyIDs().forEach([&](NoRequestingPartyIDs& noRequestingPartyIDs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRequestingPartyIDs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyIDs": [)"; + writer.noPartyIDs().forEach([&](NoPartyIDs& noPartyIDs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyIDs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noRequestingPartyIDs().forEach([](NoRequestingPartyIDs e) + { + e.skip(); + }); + noPartyIDs().forEach([](NoPartyIDs e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength( + std::size_t NoRequestingPartyIDsLength = 0, + std::size_t NoPartyIDsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoRequestingPartyIDs::sbeHeaderSize(); + if (NoRequestingPartyIDsLength > 254) + { + throw std::runtime_error("NoRequestingPartyIDsLength outside of allowed range [E110]"); + } + length += NoRequestingPartyIDsLength * NoRequestingPartyIDs::sbeBlockLength(); + + length += NoPartyIDs::sbeHeaderSize(); + if (NoPartyIDsLength > 254) + { + throw std::runtime_error("NoPartyIDsLength outside of allowed range [E110]"); + } + length += NoPartyIDsLength * NoPartyIDs::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h b/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h new file mode 100644 index 000000000..83cbca099 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTEACKSTATUS_H_ +#define _ILINKBINARY_QUOTEACKSTATUS_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class QuoteAckStatus +{ +public: + enum Value + { + Accepted = (std::uint8_t)0, + Rejected = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteAckStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Accepted; + case 5: return Rejected; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteAckStatus [E103]"); + } + + static const char* c_str(const QuoteAckStatus::Value value) + { + switch (value) + { + case Accepted: return "Accepted"; + case Rejected: return "Rejected"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteAckStatus [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, QuoteAckStatus::Value m) + { + return os << QuoteAckStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h b/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h new file mode 100644 index 000000000..095e4f36d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h @@ -0,0 +1,2303 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCEL528_H_ +#define _ILINKBINARY_QUOTECANCEL528_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancel528 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + QuoteCancel528() = default; + + QuoteCancel528( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + QuoteCancel528(char *buffer, const std::uint64_t bufferLength) : + QuoteCancel528(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancel528( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancel528(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)52; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)528; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Z"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancel528 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancel528(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancel528 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancel528( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancel528 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancel528(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteCancel528 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancel528 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancel528 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancel528 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancel528 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancel528 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancel528 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancel528 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + QuoteCancel528 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancel528 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancel528 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancel528 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + QuoteCancel528 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 46; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 46, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancel528 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 46, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteCancelTypeId() SBE_NOEXCEPT + { + return 298; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteCxlTyp::Value quoteCancelType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return QuoteCxlTyp::get((val)); + } + + QuoteCancel528 "eCancelType(const QuoteCxlTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 50, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 51; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancel528 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 51, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)10); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 10; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityGroupSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoQuoteEntries &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoQuoteEntries &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoQuoteEntries &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoQuoteEntries &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::int32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)10); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 10; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteSets &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t bidSizeId() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidSizeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t bidSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t bidSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteSets &bidSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t offerSizeId() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerSizeEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t offerSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t offerSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteSets &offerSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteSets writer) + { + builder << '{'; + builder << R"("BidSize": )"; + builder << +writer.bidSize(); + + builder << ", "; + builder << R"("OfferSize": )"; + builder << +writer.offerSize(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteSets m_noQuoteSets; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteSetsId() SBE_NOEXCEPT + { + return 296; + } + + SBE_NODISCARD inline NoQuoteSets &noQuoteSets() + { + m_noQuoteSets.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + NoQuoteSets &noQuoteSetsCount(const std::uint8_t count) + { + m_noQuoteSets.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteSetsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteSetsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteSetsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, QuoteCancel528 _writer) +{ + QuoteCancel528 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteCancel528", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("QuoteCancelType": )"; + builder << '"' << writer.quoteCancelType() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noQuoteEntries().forEach([](NoQuoteEntries e) + { + e.skip(); + }); + noQuoteSets().forEach([](NoQuoteSets e) + { + e.skip(); + }); +} + +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, + std::size_t NoQuoteSetsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoQuoteEntries::sbeHeaderSize(); + if (NoQuoteEntriesLength > 254) + { + throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]"); + } + length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength(); + + length += NoQuoteSets::sbeHeaderSize(); + if (NoQuoteSetsLength > 254) + { + throw std::runtime_error("NoQuoteSetsLength outside of allowed range [E110]"); + } + length += NoQuoteSetsLength * NoQuoteSets::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck547.h b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck547.h new file mode 100644 index 000000000..0e8fa9d0d --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck547.h @@ -0,0 +1,3240 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELACK547_H_ +#define _ILINKBINARY_QUOTECANCELACK547_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif +#include +#include +#include +#include + +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancelAck547 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + QuoteCancelAck547() = default; + + QuoteCancelAck547( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + QuoteCancelAck547(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelAck547(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelAck547( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelAck547(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)340; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)547; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelAck547 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelAck547(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelAck547 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancelAck547( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelAck547 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancelAck547(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck547 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck547 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 288, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck547 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 288, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck547 &requestTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 296, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 304, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck547 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 304, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CancelledSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cancelledSymbolId() SBE_NOEXCEPT + { + return 9774; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelledSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cancelledSymbolInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelledSymbolSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR char cancelledSymbolNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cancelledSymbolMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cancelledSymbolMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t cancelledSymbolLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *cancelledSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char *cancelledSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char cancelledSymbol(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 312 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &cancelledSymbol(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 312 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelledSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCancelledSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putCancelledSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 312, src, sizeof(char) * 6); + return *this; + } + + std::string getCancelledSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelledSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCancelledSymbolAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getCancelledSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putCancelledSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putCancelledSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 318; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 318; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 318; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 318 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 318 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 318, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 318, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 318; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + switch (*c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= *c && *c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(*c); + } + else + { + oss << *c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 318; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 323, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck547 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 323, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonId() SBE_NOEXCEPT + { + return 300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 327; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + QuoteCancelAck547 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 327, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + QuoteCancelAck547 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 331; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelAck547 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 331, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteStatusId() SBE_NOEXCEPT + { + return 297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingOffset() SBE_NOEXCEPT + { + return 332; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteCxlStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 332, sizeof(std::uint8_t)); + return QuoteCxlStatus::get((val)); + } + + QuoteCancelAck547 "eStatus(const QuoteCxlStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 332, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t noProcessedEntriesId() SBE_NOEXCEPT + { + return 9772; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noProcessedEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noProcessedEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noProcessedEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingOffset() SBE_NOEXCEPT + { + return 333; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t noProcessedEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t)); + return (val); + } + + QuoteCancelAck547 &noProcessedEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 333, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 334; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck547 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 334, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * UnsolicitedCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t unsolicitedCancelTypeId() SBE_NOEXCEPT + { + return 9775; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unsolicitedCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool unsolicitedCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= unsolicitedCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 335; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeNullValue() SBE_NOEXCEPT + { + return (char)48; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char unsolicitedCancelType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 335, sizeof(char)); + return (val); + } + + QuoteCancelAck547 &unsolicitedCancelType(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 335, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 336; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + QuoteCancelAck547 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 336, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 337; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return (val); + } + + QuoteCancelAck547 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 337, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 338; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck547 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 338, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 339; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck547 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 339, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = std::numeric_limits::max(); + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)9); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 9; + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index + 1 < m_count; + } + + inline NoQuoteEntries &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryRejectReasonId() SBE_NOEXCEPT + { + return 368; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryRejectReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryRejectReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint8_t)); + return (val); + } + + NoQuoteEntries "eEntryRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = std::numeric_limits::max(); + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)4); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 4; + m_actingVersion = actingVersion; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index + 1 < m_count; + } + + inline NoQuoteSets &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteErrorCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeId() SBE_NOEXCEPT + { + return 9030; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteErrorCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteErrorCodeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteErrorCodeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteErrorCode() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eErrorCode(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteSets writer) + { + builder << '{'; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << ", "; + builder << R"("QuoteErrorCode": )"; + builder << +writer.quoteErrorCode(); + + builder << '}'; + + return builder; + } + }; + +private: + NoQuoteSets m_noQuoteSets; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteSetsId() SBE_NOEXCEPT + { + return 296; + } + + SBE_NODISCARD inline NoQuoteSets &noQuoteSets() + { + m_noQuoteSets.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + NoQuoteSets &noQuoteSetsCount(const std::uint8_t count) + { + m_noQuoteSets.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteSetsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteSetsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteSetsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, QuoteCancelAck547 _writer) + { + QuoteCancelAck547 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteCancelAck547", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("RequestTime": )"; + builder << +writer.requestTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("CancelledSymbol": )"; + builder << '"' << + writer.getCancelledSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("NoProcessedEntries": )"; + builder << +writer.noProcessedEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("UnsolicitedCancelType": )"; + if (std::isprint(writer.unsolicitedCancelType())) + { + builder << '"' << (char)writer.unsolicitedCancelType() << '"'; + } + else + { + builder << (int)writer.unsolicitedCancelType(); + } + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h new file mode 100755 index 000000000..09a1cdf1f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h @@ -0,0 +1,3376 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELACK563_H_ +#define _ILINKBINARY_QUOTECANCELACK563_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancelAck563 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + QuoteCancelAck563() = default; + + QuoteCancelAck563( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + QuoteCancelAck563(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelAck563(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelAck563( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelAck563(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)351; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)563; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelAck563 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelAck563(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelAck563 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancelAck563( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelAck563 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancelAck563(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteCancelAck563 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck563 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck563 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 288, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck563 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 288, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck563 &requestTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 296, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 304, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck563 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 304, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CancelledSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelledSymbolId() SBE_NOEXCEPT + { + return 9774; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelledSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cancelledSymbolInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelledSymbolSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR char cancelledSymbolNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cancelledSymbolMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cancelledSymbolMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t cancelledSymbolLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *cancelledSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char *cancelledSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char cancelledSymbol(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 312 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &cancelledSymbol(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 312 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelledSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCancelledSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putCancelledSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 312, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getCancelledSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelledSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCancelledSymbolAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelledSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putCancelledSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putCancelledSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 318; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 318; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 318; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 318 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 318 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 318, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 318, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 318; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 318; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 323, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck563 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 323, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonId() SBE_NOEXCEPT + { + return 300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 327; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + QuoteCancelAck563 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 327, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + QuoteCancelAck563 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 331; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelAck563 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 331, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteStatusId() SBE_NOEXCEPT + { + return 297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingOffset() SBE_NOEXCEPT + { + return 332; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteCxlStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 332, sizeof(std::uint8_t)); + return QuoteCxlStatus::get((val)); + } + + QuoteCancelAck563 "eStatus(const QuoteCxlStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 332, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t noProcessedEntriesId() SBE_NOEXCEPT + { + return 9772; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noProcessedEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noProcessedEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noProcessedEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingOffset() SBE_NOEXCEPT + { + return 333; + } + + static SBE_CONSTEXPR std::uint32_t noProcessedEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t noProcessedEntriesMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t noProcessedEntries() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck563 &noProcessedEntries(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 333, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 337; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck563 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 337, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * UnsolicitedCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t unsolicitedCancelTypeId() SBE_NOEXCEPT + { + return 9775; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unsolicitedCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool unsolicitedCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= unsolicitedCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 338; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeNullValue() SBE_NOEXCEPT + { + return (char)48; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char unsolicitedCancelType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(char)); + return (val); + } + + QuoteCancelAck563 &unsolicitedCancelType(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 338, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 339; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + QuoteCancelAck563 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 339, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 340; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 340, sizeof(std::uint8_t)); + return (val); + } + + QuoteCancelAck563 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 340, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 341; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 341, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck563 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 341, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 342; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 342, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck563 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 342, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 343; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 343, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelAck563 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 343, &val, sizeof(std::uint64_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)9); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 9; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryRejectReasonId() SBE_NOEXCEPT + { + return 368; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryRejectReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryRejectReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint8_t)); + return (val); + } + + NoQuoteEntries "eEntryRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)4); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 4; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteSets &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteErrorCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeId() SBE_NOEXCEPT + { + return 9030; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteErrorCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteErrorCodeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteErrorCodeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteErrorCode() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eErrorCode(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoQuoteSets writer) + { + builder << '{'; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << ", "; + builder << R"("QuoteErrorCode": )"; + builder << +writer.quoteErrorCode(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteSets m_noQuoteSets; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteSetsId() SBE_NOEXCEPT + { + return 296; + } + + SBE_NODISCARD inline NoQuoteSets &noQuoteSets() + { + m_noQuoteSets.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + NoQuoteSets &noQuoteSetsCount(const std::uint8_t count) + { + m_noQuoteSets.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteSetsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteSetsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteSetsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, QuoteCancelAck563 _writer) +{ + QuoteCancelAck563 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteCancelAck563", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("RequestTime": )"; + builder << +writer.requestTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("CancelledSymbol": )"; + builder << '"' << + writer.getCancelledSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("NoProcessedEntries": )"; + builder << +writer.noProcessedEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("UnsolicitedCancelType": )"; + if (std::isprint(writer.unsolicitedCancelType())) + { + builder << '"' << (char)writer.unsolicitedCancelType() << '"'; + } + else + { + builder << (int)writer.unsolicitedCancelType(); + } + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noQuoteEntries().forEach([](NoQuoteEntries e) + { + e.skip(); + }); + noQuoteSets().forEach([](NoQuoteSets e) + { + e.skip(); + }); +} + +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, + std::size_t NoQuoteSetsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoQuoteEntries::sbeHeaderSize(); + if (NoQuoteEntriesLength > 254) + { + throw std::runtime_error("NoQuoteEntriesLength outside of allowed range [E110]"); + } + length += NoQuoteEntriesLength * NoQuoteEntries::sbeBlockLength(); + + length += NoQuoteSets::sbeHeaderSize(); + if (NoQuoteSetsLength > 254) + { + throw std::runtime_error("NoQuoteSetsLength outside of allowed range [E110]"); + } + length += NoQuoteSetsLength * NoQuoteSets::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h b/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h new file mode 100644 index 000000000..331e7f2b8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECXLSTATUS_H_ +#define _ILINKBINARY_QUOTECXLSTATUS_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class QuoteCxlStatus +{ +public: + enum Value + { + CancelperInstrument = (std::uint8_t)1, + CancelperInstrumentgroup = (std::uint8_t)3, + Cancelallquotes = (std::uint8_t)4, + Rejected = (std::uint8_t)5, + CancelperQuoteSet = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteCxlStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return CancelperInstrument; + case 3: return CancelperInstrumentgroup; + case 4: return Cancelallquotes; + case 5: return Rejected; + case 100: return CancelperQuoteSet; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteCxlStatus [E103]"); + } + + static const char* c_str(const QuoteCxlStatus::Value value) + { + switch (value) + { + case CancelperInstrument: return "CancelperInstrument"; + case CancelperInstrumentgroup: return "CancelperInstrumentgroup"; + case Cancelallquotes: return "Cancelallquotes"; + case Rejected: return "Rejected"; + case CancelperQuoteSet: return "CancelperQuoteSet"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteCxlStatus [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, QuoteCxlStatus::Value m) + { + return os << QuoteCxlStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h b/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h new file mode 100644 index 000000000..41d1887dd --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECXLTYP_H_ +#define _ILINKBINARY_QUOTECXLTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class QuoteCxlTyp +{ +public: + enum Value + { + CancelperInstrument = (std::uint8_t)1, + CancelperInstrumentgroup = (std::uint8_t)3, + Cancelallquotes = (std::uint8_t)4, + CancelperQuoteSet = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteCxlTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return CancelperInstrument; + case 3: return CancelperInstrumentgroup; + case 4: return Cancelallquotes; + case 100: return CancelperQuoteSet; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteCxlTyp [E103]"); + } + + static const char* c_str(const QuoteCxlTyp::Value value) + { + switch (value) + { + case CancelperInstrument: return "CancelperInstrument"; + case CancelperInstrumentgroup: return "CancelperInstrumentgroup"; + case Cancelallquotes: return "Cancelallquotes"; + case CancelperQuoteSet: return "CancelperQuoteSet"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteCxlTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, QuoteCxlTyp::Value m) + { + return os << QuoteCxlTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h b/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h new file mode 100644 index 000000000..1bc398b5b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTETYP_H_ +#define _ILINKBINARY_QUOTETYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class QuoteTyp +{ +public: + enum Value + { + Tradeable = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Tradeable; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteTyp [E103]"); + } + + static const char* c_str(const QuoteTyp::Value value) + { + switch (value) + { + case Tradeable: return "Tradeable"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, QuoteTyp::Value m) + { + return os << QuoteTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/README.txt b/src/lib/orderman/actors/ilink3/generated/README.txt new file mode 100644 index 000000000..64d3df695 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/README.txt @@ -0,0 +1,13 @@ +To update ilinkbinary.xml +sftp cmeconfig@sftpng.cmegroup.com +password: G3t(0nnect3d +get /MSGW/NRCert/Templates/ilinkbinary.xml + +To generate: + +Download sbe-all-[version].jar from sbe-logic github releases. + +docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.16.1.jar ilinkbinary.xml +#docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=uk.co.real_logic.sbe.generation.rust.Rust -jar sbe-all-1.16.1.jar ilinkbinary.xml + + diff --git a/src/lib/orderman/actors/ilink3/generated/RFQSide.h b/src/lib/orderman/actors/ilink3/generated/RFQSide.h new file mode 100644 index 000000000..686527ef2 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/RFQSide.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RFQSIDE_H_ +#define _ILINKBINARY_RFQSIDE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class RFQSide +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + Cross = (std::uint8_t)8, + NULL_VALUE = (std::uint8_t)255 + }; + + static RFQSide::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 8: return Cross; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum RFQSide [E103]"); + } + + static const char* c_str(const RFQSide::Value value) + { + switch (value) + { + case Buy: return "Buy"; + case Sell: return "Sell"; + case Cross: return "Cross"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum RFQSide [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, RFQSide::Value m) + { + return os << RFQSide::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ReqResult.h b/src/lib/orderman/actors/ilink3/generated/ReqResult.h new file mode 100644 index 000000000..48766fc3f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ReqResult.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQRESULT_H_ +#define _ILINKBINARY_REQRESULT_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ReqResult +{ +public: + enum Value + { + ValidRequest = (std::uint8_t)0, + NoDataFoundThatMatchedSelectionCriteria = (std::uint8_t)2, + NotAuthorizedtoRetrieveData = (std::uint8_t)3, + DataTemporarilyUnavailable = (std::uint8_t)4, + NULL_VALUE = (std::uint8_t)255 + }; + + static ReqResult::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return ValidRequest; + case 2: return NoDataFoundThatMatchedSelectionCriteria; + case 3: return NotAuthorizedtoRetrieveData; + case 4: return DataTemporarilyUnavailable; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ReqResult [E103]"); + } + + static const char* c_str(const ReqResult::Value value) + { + switch (value) + { + case ValidRequest: return "ValidRequest"; + case NoDataFoundThatMatchedSelectionCriteria: return "NoDataFoundThatMatchedSelectionCriteria"; + case NotAuthorizedtoRetrieveData: return "NotAuthorizedtoRetrieveData"; + case DataTemporarilyUnavailable: return "DataTemporarilyUnavailable"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ReqResult [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ReqResult::Value m) + { + return os << ReqResult::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h b/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h new file mode 100644 index 000000000..63840cc91 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h @@ -0,0 +1,1686 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQUESTFORQUOTE543_H_ +#define _ILINKBINARY_REQUESTFORQUOTE543_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class RequestForQuote543 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + RequestForQuote543() = default; + + RequestForQuote543( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + RequestForQuote543(char *buffer, const std::uint64_t bufferLength) : + RequestForQuote543(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RequestForQuote543( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RequestForQuote543(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)55; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)543; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "R"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RequestForQuote543 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RequestForQuote543(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RequestForQuote543 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = RequestForQuote543( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RequestForQuote543 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = RequestForQuote543(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + RequestForQuote543 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuote543 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuote543 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + RequestForQuote543 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RequestForQuote543 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuote543 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuote543 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuote543 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + RequestForQuote543 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuote543 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuote543 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuote543 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuote543 &putLocation(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + RequestForQuote543 &putLocation(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteTypeId() SBE_NOEXCEPT + { + return 537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteTypeEncodingOffset() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteTyp::Value quoteType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 54, sizeof(std::uint8_t)); + return QuoteTyp::get((val)); + } + + RequestForQuote543 "eType(const QuoteTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 54, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoRelatedSym + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)9); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 9; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoRelatedSym &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedSym &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedSym &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD RFQSide::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint8_t)); + return RFQSide::get((val)); + } + + NoRelatedSym &side(const RFQSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoRelatedSym writer) + { + builder << '{'; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoRelatedSym m_noRelatedSym; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRelatedSymId() SBE_NOEXCEPT + { + return 146; + } + + SBE_NODISCARD inline NoRelatedSym &noRelatedSym() + { + m_noRelatedSym.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } + + NoRelatedSym &noRelatedSymCount(const std::uint8_t count) + { + m_noRelatedSym.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRelatedSymSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noRelatedSymInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noRelatedSymSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, RequestForQuote543 _writer) +{ + RequestForQuote543 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RequestForQuote543", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteType": )"; + builder << '"' << writer.quoteType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRelatedSym": [)"; + writer.noRelatedSym().forEach([&](NoRelatedSym& noRelatedSym) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRelatedSym; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noRelatedSym().forEach([](NoRelatedSym e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoRelatedSymLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoRelatedSym::sbeHeaderSize(); + if (NoRelatedSymLength > 254) + { + throw std::runtime_error("NoRelatedSymLength outside of allowed range [E110]"); + } + length += NoRelatedSymLength * NoRelatedSym::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h b/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h new file mode 100644 index 000000000..41963dde4 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h @@ -0,0 +1,2149 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQUESTFORQUOTEACK546_H_ +#define _ILINKBINARY_REQUESTFORQUOTEACK546_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class RequestForQuoteAck546 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + RequestForQuoteAck546() = default; + + RequestForQuoteAck546( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + RequestForQuoteAck546(char *buffer, const std::uint64_t bufferLength) : + RequestForQuoteAck546(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RequestForQuoteAck546( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RequestForQuoteAck546(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)358; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)546; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RequestForQuoteAck546 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RequestForQuoteAck546(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RequestForQuoteAck546 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = RequestForQuoteAck546( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RequestForQuoteAck546 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = RequestForQuoteAck546(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + RequestForQuoteAck546 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RequestForQuoteAck546 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExchangeQuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t exchangeQuoteReqIDId() SBE_NOEXCEPT + { + return 9770; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exchangeQuoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exchangeQuoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exchangeQuoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exchangeQuoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t exchangeQuoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint64_t exchangeQuoteReqIDLength() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD const char *exchangeQuoteReqID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 288; + } + + SBE_NODISCARD char *exchangeQuoteReqID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 288; + } + + SBE_NODISCARD char exchangeQuoteReqID(const std::uint64_t index) const + { + if (index >= 17) + { + throw std::runtime_error("index out of range for exchangeQuoteReqID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 288 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &exchangeQuoteReqID(const std::uint64_t index, const char value) + { + if (index >= 17) + { + throw std::runtime_error("index out of range for exchangeQuoteReqID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 288 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExchangeQuoteReqID(char *const dst, const std::uint64_t length) const + { + if (length > 17) + { + throw std::runtime_error("length too large for getExchangeQuoteReqID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 288, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putExchangeQuoteReqID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 288, src, sizeof(char) * 17); + return *this; + } + + SBE_NODISCARD std::string getExchangeQuoteReqIDAsString() const + { + const char *buffer = m_buffer + m_offset + 288; + size_t length = 0; + + for (; length < 17 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExchangeQuoteReqIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExchangeQuoteReqIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExchangeQuoteReqIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 288; + size_t length = 0; + + for (; length < 17 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 17) + { + throw std::runtime_error("string too large for putExchangeQuoteReqID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 288, str.data(), srcLength); + for (size_t start = srcLength; start < 17; ++start) + { + m_buffer[m_offset + 288 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 17) + { + throw std::runtime_error("string too large for putExchangeQuoteReqID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 288, str.c_str(), srcLength); + for (size_t start = srcLength; start < 17; ++start) + { + m_buffer[m_offset + 288 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 305; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 305, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 305, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 313; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 313, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &requestTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 313, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 321; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 321, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 321, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 337; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 337; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 337; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 337 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 337 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 337, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 337, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 337; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 337; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 337, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 337 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 337, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 337 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonId() SBE_NOEXCEPT + { + return 300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 342; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 342, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RequestForQuoteAck546 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 342, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 344; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 344, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RequestForQuoteAck546 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 344, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteStatusId() SBE_NOEXCEPT + { + return 297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingOffset() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 346, sizeof(std::uint8_t)); + return QuoteAckStatus::get((val)); + } + + RequestForQuoteAck546 "eStatus(const QuoteAckStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 346, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 347; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 347, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + RequestForQuoteAck546 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 347, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + RequestForQuoteAck546 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 349; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 349, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + RequestForQuoteAck546 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 349, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 350; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + if (m_actingVersion < 4) + { + return 0xffffffffffffffffL; + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 350, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 350, &val, sizeof(std::uint64_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, RequestForQuoteAck546 _writer) +{ + RequestForQuoteAck546 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RequestForQuoteAck546", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ExchangeQuoteReqID": )"; + builder << '"' << + writer.getExchangeQuoteReqIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("RequestTime": )"; + builder << +writer.requestTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Retransmission509.h b/src/lib/orderman/actors/ilink3/generated/Retransmission509.h new file mode 100644 index 000000000..a32e7510c --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Retransmission509.h @@ -0,0 +1,815 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMISSION509_H_ +#define _ILINKBINARY_RETRANSMISSION509_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class Retransmission509 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Retransmission509() = default; + + Retransmission509( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + Retransmission509(char *buffer, const std::uint64_t bufferLength) : + Retransmission509(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Retransmission509( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Retransmission509(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)509; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Retransmission"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Retransmission509 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Retransmission509(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Retransmission509 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = Retransmission509( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Retransmission509 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Retransmission509(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + Retransmission509 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Retransmission509 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Retransmission509 &lastUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Retransmission509 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Retransmission509 &fromSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint16_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t msgCount() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Retransmission509 &msgCount(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 30; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 30, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + Retransmission509 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 30, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Retransmission509 _writer) +{ + Retransmission509 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Retransmission509", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h b/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h new file mode 100644 index 000000000..b9f120b0b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h @@ -0,0 +1,951 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMITREJECT510_H_ +#define _ILINKBINARY_RETRANSMITREJECT510_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class RetransmitReject510 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + RetransmitReject510() = default; + + RetransmitReject510( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + RetransmitReject510(char *buffer, const std::uint64_t bufferLength) : + RetransmitReject510(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RetransmitReject510( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RetransmitReject510(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)510; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "RetransmitReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RetransmitReject510 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RetransmitReject510(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RetransmitReject510 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = RetransmitReject510( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RetransmitReject510 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = RetransmitReject510(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + RetransmitReject510 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + RetransmitReject510 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + RetransmitReject510 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + SBE_NODISCARD std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RetransmitReject510 &putReason(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + RetransmitReject510 &putReason(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &lastUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 72, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RetransmitReject510 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 72, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 74, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + RetransmitReject510 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 74, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, RetransmitReject510 _writer) +{ + RetransmitReject510 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RetransmitReject510", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h b/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h new file mode 100644 index 000000000..3be2d2e20 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h @@ -0,0 +1,755 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMITREQUEST508_H_ +#define _ILINKBINARY_RETRANSMITREQUEST508_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class RetransmitRequest508 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + RetransmitRequest508() = default; + + RetransmitRequest508( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + RetransmitRequest508(char *buffer, const std::uint64_t bufferLength) : + RetransmitRequest508(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RetransmitRequest508( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RetransmitRequest508(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)30; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)508; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "RetransmitRequest"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RetransmitRequest508 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RetransmitRequest508(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RetransmitRequest508 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = RetransmitRequest508( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RetransmitRequest508 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = RetransmitRequest508(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + RetransmitRequest508 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitRequest508 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitRequest508 &lastUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitRequest508 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RetransmitRequest508 &fromSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint16_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t msgCount() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RetransmitRequest508 &msgCount(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint16_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, RetransmitRequest508 _writer) +{ + RetransmitRequest508 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RetransmitRequest508", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SLEDS.h b/src/lib/orderman/actors/ilink3/generated/SLEDS.h new file mode 100644 index 000000000..390cad931 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SLEDS.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SLEDS_H_ +#define _ILINKBINARY_SLEDS_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SLEDS +{ +public: + enum Value + { + TradeClearingatExecutionPrice = (std::uint8_t)0, + TradeClearingatAlternateClearingPrice = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static SLEDS::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return TradeClearingatExecutionPrice; + case 1: return TradeClearingatAlternateClearingPrice; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SLEDS [E103]"); + } + + static const char* c_str(const SLEDS::Value value) + { + switch (value) + { + case TradeClearingatExecutionPrice: return "TradeClearingatExecutionPrice"; + case TradeClearingatAlternateClearingPrice: return "TradeClearingatAlternateClearingPrice"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SLEDS [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SLEDS::Value m) + { + return os << SLEDS::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SMPI.h b/src/lib/orderman/actors/ilink3/generated/SMPI.h new file mode 100644 index 000000000..b1cec2123 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SMPI.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SMPI_H_ +#define _ILINKBINARY_SMPI_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SMPI +{ +public: + enum Value + { + CancelNewest = (char)78, + CancelOldest = (char)79, + NULL_VALUE = (char)0 + }; + + static SMPI::Value get(const char value) + { + switch (value) + { + case 78: return CancelNewest; + case 79: return CancelOldest; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SMPI [E103]"); + } + + static const char* c_str(const SMPI::Value value) + { + switch (value) + { + case CancelNewest: return "CancelNewest"; + case CancelOldest: return "CancelOldest"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SMPI [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SMPI::Value m) + { + return os << SMPI::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h b/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h new file mode 100644 index 000000000..d0c448e9b --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECRSPTYP_H_ +#define _ILINKBINARY_SECRSPTYP_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SecRspTyp +{ +public: + enum Value + { + AcceptSecurityProposalasis = (std::uint8_t)1, + AcceptSecurityproposalwithrevisionsasindicatedinthemessage = (std::uint8_t)2, + RejectSecurityProposal = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static SecRspTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return AcceptSecurityProposalasis; + case 2: return AcceptSecurityproposalwithrevisionsasindicatedinthemessage; + case 5: return RejectSecurityProposal; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SecRspTyp [E103]"); + } + + static const char* c_str(const SecRspTyp::Value value) + { + switch (value) + { + case AcceptSecurityProposalasis: return "AcceptSecurityProposalasis"; + case AcceptSecurityproposalwithrevisionsasindicatedinthemessage: return "AcceptSecurityproposalwithrevisionsasindicatedinthemessage"; + case RejectSecurityProposal: return "RejectSecurityProposal"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SecRspTyp [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SecRspTyp::Value m) + { + return os << SecRspTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h new file mode 100644 index 000000000..86fe9a791 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h @@ -0,0 +1,2489 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECURITYDEFINITIONREQUEST560_H_ +#define _ILINKBINARY_SECURITYDEFINITIONREQUEST560_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class SecurityDefinitionRequest560 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + SecurityDefinitionRequest560() = default; + + SecurityDefinitionRequest560( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + SecurityDefinitionRequest560(char *buffer, const std::uint64_t bufferLength) : + SecurityDefinitionRequest560(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + SecurityDefinitionRequest560( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SecurityDefinitionRequest560(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)560; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "c"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SecurityDefinitionRequest560 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionRequest560(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + SecurityDefinitionRequest560 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = SecurityDefinitionRequest560( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + SecurityDefinitionRequest560 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionRequest560(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + SecurityDefinitionRequest560 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionRequest560 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityReqIDId() SBE_NOEXCEPT + { + return 320; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionRequest560 &securityReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + SecurityDefinitionRequest560 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionRequest560 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionRequest560 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionRequest560 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putSenderID(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putSenderID(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityReqTypeId() SBE_NOEXCEPT + { + return 321; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char securityReqTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityReqTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityReqTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityReqTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t securityReqTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *securityReqType() const + { + static const std::uint8_t securityReqTypeValues[] = { 49 }; + + return (const char *)securityReqTypeValues; + } + + SBE_NODISCARD char securityReqType(const std::uint64_t index) const + { + static const std::uint8_t securityReqTypeValues[] = { 49 }; + + return (char)securityReqTypeValues[index]; + } + + std::uint64_t getSecurityReqType(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityReqTypeValues[] = { 49 }; + std::uint64_t bytesToCopy = length < sizeof(securityReqTypeValues) ? length : sizeof(securityReqTypeValues); + + std::memcpy(dst, securityReqTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getSecurityReqTypeAsString() const + { + static const std::uint8_t SecurityReqTypeValues[] = { 49 }; + + return std::string((const char *)SecurityReqTypeValues, 1); + } + + std::string getSecurityReqTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityReqTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionRequest560 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecuritySubTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT + { + return 762; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securitySubTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securitySubTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securitySubTypeEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securitySubTypeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char securitySubType(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for securitySubType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionRequest560 &securitySubType(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for securitySubType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecuritySubType(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getSecuritySubType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionRequest560 &putSecuritySubType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getSecuritySubTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecuritySubTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecuritySubTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putSecuritySubType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putSecuritySubType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 57; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 57 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionRequest560 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 57 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 57, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionRequest560 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 57, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * StartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t startDateId() SBE_NOEXCEPT + { + return 916; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t startDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool startDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= startDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t startDateEncodingOffset() SBE_NOEXCEPT + { + return 62; + } + + static SBE_CONSTEXPR std::uint16_t startDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t startDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t startDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t startDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t startDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 62, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionRequest560 &startDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 62, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * EndDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t endDateId() SBE_NOEXCEPT + { + return 917; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t endDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool endDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= endDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t endDateEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t endDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t endDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t endDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t endDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t endDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionRequest560 &endDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MaxNoOfSubstitutionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t maxNoOfSubstitutionsId() SBE_NOEXCEPT + { + return 37715; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxNoOfSubstitutionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maxNoOfSubstitutionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maxNoOfSubstitutionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t maxNoOfSubstitutions() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionRequest560 &maxNoOfSubstitutions(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SourceRepoIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sourceRepoIDId() SBE_NOEXCEPT + { + return 5677; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sourceRepoIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sourceRepoIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sourceRepoIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t sourceRepoID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionRequest560 &sourceRepoID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::int32_t)); + return *this; + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)19); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 19; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoLegs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * LegPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_legPrice; + +public: + SBE_NODISCARD PRICENULL9 &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + +private: + Decimal32NULL m_legOptionDelta; + +public: + SBE_NODISCARD Decimal32NULL &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 12, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t legRatioQty() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SecurityDefinitionRequest560 _writer) +{ + SecurityDefinitionRequest560 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SecurityDefinitionRequest560", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SecurityReqID": )"; + builder << +writer.securityReqID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecuritySubType": )"; + builder << '"' << + writer.getSecuritySubTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("StartDate": )"; + builder << +writer.startDate(); + + builder << ", "; + builder << R"("EndDate": )"; + builder << +writer.endDate(); + + builder << ", "; + builder << R"("MaxNoOfSubstitutions": )"; + builder << +writer.maxNoOfSubstitutions(); + + builder << ", "; + builder << R"("SourceRepoID": )"; + builder << +writer.sourceRepoID(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoLegsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoLegs::sbeHeaderSize(); + if (NoLegsLength > 254) + { + throw std::runtime_error("NoLegsLength outside of allowed range [E110]"); + } + length += NoLegsLength * NoLegs::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h new file mode 100644 index 000000000..c04dec345 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h @@ -0,0 +1,4566 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_H_ +#define _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class SecurityDefinitionResponse561 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + SecurityDefinitionResponse561() = default; + + SecurityDefinitionResponse561( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + SecurityDefinitionResponse561(char *buffer, const std::uint64_t bufferLength) : + SecurityDefinitionResponse561(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + SecurityDefinitionResponse561( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SecurityDefinitionResponse561(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)429; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)561; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SecurityDefinitionResponse561 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionResponse561(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + SecurityDefinitionResponse561 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = SecurityDefinitionResponse561( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + SecurityDefinitionResponse561 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionResponse561(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + SecurityDefinitionResponse561 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionResponse561 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putText(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putText(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FinancialInstrumentFullNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t financialInstrumentFullNameId() SBE_NOEXCEPT + { + return 2714; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t financialInstrumentFullNameSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool financialInstrumentFullNameInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= financialInstrumentFullNameSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t financialInstrumentFullNameEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t financialInstrumentFullNameEncodingLength() SBE_NOEXCEPT + { + return 35; + } + + static SBE_CONSTEXPR std::uint64_t financialInstrumentFullNameLength() SBE_NOEXCEPT + { + return 35; + } + + SBE_NODISCARD const char *financialInstrumentFullName() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *financialInstrumentFullName() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char financialInstrumentFullName(const std::uint64_t index) const + { + if (index >= 35) + { + throw std::runtime_error("index out of range for financialInstrumentFullName [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &financialInstrumentFullName(const std::uint64_t index, const char value) + { + if (index >= 35) + { + throw std::runtime_error("index out of range for financialInstrumentFullName [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFinancialInstrumentFullName(char *const dst, const std::uint64_t length) const + { + if (length > 35) + { + throw std::runtime_error("length too large for getFinancialInstrumentFullName [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 35); + return *this; + } + + SBE_NODISCARD std::string getFinancialInstrumentFullNameAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 35 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFinancialInstrumentFullNameAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFinancialInstrumentFullNameAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getFinancialInstrumentFullNameAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 35 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 35) + { + throw std::runtime_error("string too large for putFinancialInstrumentFullName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 35; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 35) + { + throw std::runtime_error("string too large for putFinancialInstrumentFullName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 35; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 303; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 303; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 303; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 303 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 303 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 303, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 303, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 303; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 303; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 303, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 303 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 303, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 303 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= symbolSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 323; + } + + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 323; + } + + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 323 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 323 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 323, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 323, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 323; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 323; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 323, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 323 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 323, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 323 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 343; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 343, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 343, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityReqIDId() SBE_NOEXCEPT + { + return 320; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqIDEncodingOffset() SBE_NOEXCEPT + { + return 351; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 351, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &securityReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 351, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityResponseIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityResponseIDId() SBE_NOEXCEPT + { + return 322; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityResponseIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityResponseIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityResponseIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseIDEncodingOffset() SBE_NOEXCEPT + { + return 359; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityResponseIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityResponseID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 359, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &securityResponseID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 359, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 367; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 367, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 367, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 375; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 375; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 375; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 375 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 375 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 375, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 375, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 375; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 375; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 375, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 375 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 375, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 375 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 381; + } + + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 381; + } + + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 381; + } + + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 381 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 381 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 381, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 381, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 381; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 381; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 381, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 381 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 381, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 381 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 387; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 387; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 387; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 387 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 387 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 387, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 387, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 387; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 387; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 387, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 387 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 387, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 387 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 392; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 392, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionResponse561 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 392, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= currencySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 396; + } + + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 396; + } + + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 396; + } + + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 396 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 396 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 396, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 396, src, sizeof(char) * 3); + return *this; + } + + SecurityDefinitionResponse561 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 396, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 397, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 398, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 396; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 396; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } + + std::memcpy(m_buffer + m_offset + 396, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 396 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } + + std::memcpy(m_buffer + m_offset + 396, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 396 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSourceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; + + return (const char *)securityIDSourceValues; + } + + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; + + return (char)securityIDSourceValues[index]; + } + + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); + + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)SecurityIDSourceValues, 1); + } + + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maturityMonthYearSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + +private: + MaturityMonthYear m_maturityMonthYear; + +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 399, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 404; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 404, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * StartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t startDateId() SBE_NOEXCEPT + { + return 916; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t startDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool startDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= startDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t startDateEncodingOffset() SBE_NOEXCEPT + { + return 406; + } + + static SBE_CONSTEXPR std::uint16_t startDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t startDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t startDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t startDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t startDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 406, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &startDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 406, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * EndDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t endDateId() SBE_NOEXCEPT + { + return 917; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t endDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool endDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= endDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t endDateEncodingOffset() SBE_NOEXCEPT + { + return 408; + } + + static SBE_CONSTEXPR std::uint16_t endDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t endDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t endDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t endDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t endDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 408, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &endDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 408, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MaxNoOfSubstitutionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t maxNoOfSubstitutionsId() SBE_NOEXCEPT + { + return 37715; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxNoOfSubstitutionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maxNoOfSubstitutionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maxNoOfSubstitutionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingOffset() SBE_NOEXCEPT + { + return 410; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t maxNoOfSubstitutions() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 410, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionResponse561 &maxNoOfSubstitutions(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 410, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SourceRepoIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sourceRepoIDId() SBE_NOEXCEPT + { + return 5677; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sourceRepoIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sourceRepoIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sourceRepoIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingOffset() SBE_NOEXCEPT + { + return 411; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t sourceRepoID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 411, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionResponse561 &sourceRepoID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 411, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * TerminationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t terminationTypeId() SBE_NOEXCEPT + { + return 788; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t terminationTypeSinceVersion() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD bool terminationTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= terminationTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t terminationTypeEncodingOffset() SBE_NOEXCEPT + { + return 415; + } + + static SBE_CONSTEXPR char terminationTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char terminationTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char terminationTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t terminationTypeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t terminationTypeLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *terminationType() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return nullptr; + } + + return m_buffer + m_offset + 415; + } + + SBE_NODISCARD char *terminationType() SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return nullptr; + } + + return m_buffer + m_offset + 415; + } + + SBE_NODISCARD char terminationType(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for terminationType [E104]"); + } + + if (m_actingVersion < 3) + { + return (char)0; + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 415 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &terminationType(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for terminationType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 415 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTerminationType(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getTerminationType [E106]"); + } + + if (m_actingVersion < 3) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 415, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putTerminationType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 415, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getTerminationTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 415; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTerminationTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTerminationTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTerminationTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 415; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putTerminationType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putTerminationType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 415, str.data(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 415 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putTerminationType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putTerminationType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 415, str.c_str(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 415 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityResponseTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityResponseTypeId() SBE_NOEXCEPT + { + return 323; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityResponseTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityResponseTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityResponseTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseTypeEncodingOffset() SBE_NOEXCEPT + { + return 423; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SecRspTyp::Value securityResponseType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 423, sizeof(std::uint8_t)); + return SecRspTyp::get((val)); + } + + SecurityDefinitionResponse561 &securityResponseType(const SecRspTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 423, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= userDefinedInstrumentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 424; + } + + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *userDefinedInstrument() const + { + static const std::uint8_t userDefinedInstrumentValues[] = { 89 }; + + return (const char *)userDefinedInstrumentValues; + } + + SBE_NODISCARD char userDefinedInstrument(const std::uint64_t index) const + { + static const std::uint8_t userDefinedInstrumentValues[] = { 89 }; + + return (char)userDefinedInstrumentValues[index]; + } + + std::uint64_t getUserDefinedInstrument(char *dst, const std::uint64_t length) const + { + static std::uint8_t userDefinedInstrumentValues[] = { 89 }; + std::uint64_t bytesToCopy = length < sizeof(userDefinedInstrumentValues) ? length : sizeof(userDefinedInstrumentValues); + + std::memcpy(dst, userDefinedInstrumentValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getUserDefinedInstrumentAsString() const + { + static const std::uint8_t UserDefinedInstrumentValues[] = { 89 }; + + return std::string((const char *)UserDefinedInstrumentValues, 1); + } + + std::string getUserDefinedInstrumentAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUserDefinedInstrumentAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * ExpirationCycleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t expirationCycleId() SBE_NOEXCEPT + { + return 827; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expirationCycleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expirationCycleInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expirationCycleSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expirationCycleEncodingOffset() SBE_NOEXCEPT + { + return 424; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expirationCycleEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExpCycle::Value expirationCycle() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 424, sizeof(std::uint8_t)); + return ExpCycle::get((val)); + } + + SecurityDefinitionResponse561 &expirationCycle(const ExpCycle::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 424, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 425; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 425, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + SecurityDefinitionResponse561 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 425, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 426; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 426, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + SecurityDefinitionResponse561 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 426, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AutoQuoteRequestMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t autoQuoteRequestId() SBE_NOEXCEPT + { + return 9776; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t autoQuoteRequestSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool autoQuoteRequestInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= autoQuoteRequestSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t autoQuoteRequestEncodingOffset() SBE_NOEXCEPT + { + return 427; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t autoQuoteRequestEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value autoQuoteRequest() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 427, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + SecurityDefinitionResponse561 &autoQuoteRequest(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 427, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 428; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 428, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + SecurityDefinitionResponse561 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 428, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength((std::uint16_t)19); + dimensions.numInGroup((std::uint8_t)count); + m_index = 0; + m_count = count; + m_blockLength = 19; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoLegs &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup((std::uint8_t)m_count); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_legPrice; + +public: + SBE_NODISCARD PRICENULL9 &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char * LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + Decimal32NULL m_legOptionDelta; + +public: + SBE_NODISCARD Decimal32NULL &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + SBE_NODISCARD static const char * LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t legRatioQty() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SecurityDefinitionResponse561 _writer) +{ + SecurityDefinitionResponse561 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SecurityDefinitionResponse561", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FinancialInstrumentFullName": )"; + builder << '"' << + writer.getFinancialInstrumentFullNameAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SecurityReqID": )"; + builder << +writer.securityReqID(); + + builder << ", "; + builder << R"("SecurityResponseID": )"; + builder << +writer.securityResponseID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("StartDate": )"; + builder << +writer.startDate(); + + builder << ", "; + builder << R"("EndDate": )"; + builder << +writer.endDate(); + + builder << ", "; + builder << R"("MaxNoOfSubstitutions": )"; + builder << +writer.maxNoOfSubstitutions(); + + builder << ", "; + builder << R"("SourceRepoID": )"; + builder << +writer.sourceRepoID(); + + builder << ", "; + builder << R"("TerminationType": )"; + builder << '"' << + writer.getTerminationTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityResponseType": )"; + builder << '"' << writer.securityResponseType() << '"'; + + builder << ", "; + builder << R"("ExpirationCycle": )"; + builder << '"' << writer.expirationCycle() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("AutoQuoteRequest": )"; + builder << '"' << writer.autoQuoteRequest() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t NoLegsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + + length += NoLegs::sbeHeaderSize(); + if (NoLegsLength > 254) + { + throw std::runtime_error("NoLegsLength outside of allowed range [E110]"); + } + length += NoLegsLength * NoLegs::sbeBlockLength(); + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Sequence506.h b/src/lib/orderman/actors/ilink3/generated/Sequence506.h new file mode 100644 index 000000000..eb503a376 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Sequence506.h @@ -0,0 +1,650 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SEQUENCE506_H_ +#define _ILINKBINARY_SEQUENCE506_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class Sequence506 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Sequence506() = default; + + Sequence506( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + Sequence506(char *buffer, const std::uint64_t bufferLength) : + Sequence506(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Sequence506( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Sequence506(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Sequence"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Sequence506 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Sequence506(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Sequence506 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = Sequence506( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Sequence506 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Sequence506(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + Sequence506 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Sequence506 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Sequence506 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + Sequence506 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * KeepAliveIntervalLapsedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalLapsedId() SBE_NOEXCEPT + { + return 39016; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalLapsedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalLapsedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalLapsedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalLapsedEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalLapsedEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD KeepAliveLapsed::Value keepAliveIntervalLapsed() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint8_t)); + return KeepAliveLapsed::get((val)); + } + + Sequence506 &keepAliveIntervalLapsed(const KeepAliveLapsed::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Sequence506 _writer) +{ + Sequence506 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Sequence506", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("KeepAliveIntervalLapsed": )"; + builder << '"' << writer.keepAliveIntervalLapsed() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h b/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h new file mode 100644 index 000000000..290718e6f --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SHORTSALETYPE_H_ +#define _ILINKBINARY_SHORTSALETYPE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class ShortSaleType +{ +public: + enum Value + { + LongSell = (std::uint8_t)0, + ShortSaleWithNoExemptionSESH = (std::uint8_t)1, + ShortSaleWithExemptionSSEX = (std::uint8_t)2, + UndisclosedSellInformationNotAvailableUNDI = (std::uint8_t)3, + NULL_VALUE = (std::uint8_t)255 + }; + + static ShortSaleType::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return LongSell; + case 1: return ShortSaleWithNoExemptionSESH; + case 2: return ShortSaleWithExemptionSSEX; + case 3: return UndisclosedSellInformationNotAvailableUNDI; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ShortSaleType [E103]"); + } + + static const char* c_str(const ShortSaleType::Value value) + { + switch (value) + { + case LongSell: return "LongSell"; + case ShortSaleWithNoExemptionSESH: return "ShortSaleWithNoExemptionSESH"; + case ShortSaleWithExemptionSSEX: return "ShortSaleWithExemptionSSEX"; + case UndisclosedSellInformationNotAvailableUNDI: return "UndisclosedSellInformationNotAvailableUNDI"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ShortSaleType [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, ShortSaleType::Value m) + { + return os << ShortSaleType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SideNULL.h b/src/lib/orderman/actors/ilink3/generated/SideNULL.h new file mode 100644 index 000000000..a7270e8f8 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SideNULL.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDENULL_H_ +#define _ILINKBINARY_SIDENULL_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SideNULL +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideNULL::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideNULL [E103]"); + } + + static const char* c_str(const SideNULL::Value value) + { + switch (value) + { + case Buy: return "Buy"; + case Sell: return "Sell"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SideNULL [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SideNULL::Value m) + { + return os << SideNULL::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SideReq.h b/src/lib/orderman/actors/ilink3/generated/SideReq.h new file mode 100644 index 000000000..80f957fc9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SideReq.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDEREQ_H_ +#define _ILINKBINARY_SIDEREQ_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SideReq +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideReq::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideReq [E103]"); + } + + static const char* c_str(const SideReq::Value value) + { + switch (value) + { + case Buy: return "Buy"; + case Sell: return "Sell"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SideReq [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SideReq::Value m) + { + return os << SideReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h b/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h new file mode 100644 index 000000000..7ad451864 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDETIMEINFORCE_H_ +#define _ILINKBINARY_SIDETIMEINFORCE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SideTimeInForce +{ +public: + enum Value + { + Day = (std::uint8_t)0, + FAK = (std::uint8_t)3, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideTimeInForce::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 3: return FAK; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideTimeInForce [E103]"); + } + + static const char* c_str(const SideTimeInForce::Value value) + { + switch (value) + { + case Day: return "Day"; + case FAK: return "FAK"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SideTimeInForce [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SideTimeInForce::Value m) + { + return os << SideTimeInForce::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/SplitMsg.h b/src/lib/orderman/actors/ilink3/generated/SplitMsg.h new file mode 100644 index 000000000..e8742dfe2 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/SplitMsg.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SPLITMSG_H_ +#define _ILINKBINARY_SPLITMSG_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class SplitMsg +{ +public: + enum Value + { + SplitMessageDelayed = (std::uint8_t)0, + OutofOrderMessageDelayed = (std::uint8_t)1, + CompleteMessageDelayed = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SplitMsg::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return SplitMessageDelayed; + case 1: return OutofOrderMessageDelayed; + case 2: return CompleteMessageDelayed; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SplitMsg [E103]"); + } + + static const char* c_str(const SplitMsg::Value value) + { + switch (value) + { + case SplitMessageDelayed: return "SplitMessageDelayed"; + case OutofOrderMessageDelayed: return "OutofOrderMessageDelayed"; + case CompleteMessageDelayed: return "CompleteMessageDelayed"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SplitMsg [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SplitMsg::Value m) + { + return os << SplitMsg::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/Terminate507.h b/src/lib/orderman/actors/ilink3/generated/Terminate507.h new file mode 100644 index 000000000..0f1c792d9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/Terminate507.h @@ -0,0 +1,876 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TERMINATE507_H_ +#define _ILINKBINARY_TERMINATE507_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "OrderStatus.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class Terminate507 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + Terminate507() = default; + + Terminate507( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } + + Terminate507(char *buffer, const std::uint64_t bufferLength) : + Terminate507(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Terminate507( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Terminate507(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return MessageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)5; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Terminate"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Terminate507 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Terminate507(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Terminate507 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = Terminate507( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Terminate507 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Terminate507(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + Terminate507 skipper(m_buffer, m_offset, + m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char * buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Terminate507 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Terminate507 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + SBE_NODISCARD std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Terminate507 &putReason(const std::string_view str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Terminate507 &putReason(const std::string& str) + { + const 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) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Terminate507 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Terminate507 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Terminate507 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + Terminate507 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Terminate507 _writer) +{ + Terminate507 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Terminate507", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/TimeInForce.h b/src/lib/orderman/actors/ilink3/generated/TimeInForce.h new file mode 100644 index 000000000..6c5094ec9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/TimeInForce.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TIMEINFORCE_H_ +#define _ILINKBINARY_TIMEINFORCE_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class TimeInForce +{ +public: + enum Value + { + Day = (std::uint8_t)0, + GoodTillCancel = (std::uint8_t)1, + FillAndKill = (std::uint8_t)3, + FillOrKill = (std::uint8_t)4, + GoodTillDate = (std::uint8_t)6, + NULL_VALUE = (std::uint8_t)255 + }; + + static TimeInForce::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 1: return GoodTillCancel; + case 3: return FillAndKill; + case 4: return FillOrKill; + case 6: return GoodTillDate; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum TimeInForce [E103]"); + } + + static const char* c_str(const TimeInForce::Value value) + { + switch (value) + { + case Day: return "Day"; + case GoodTillCancel: return "GoodTillCancel"; + case FillAndKill: return "FillAndKill"; + case FillOrKill: return "FillOrKill"; + case GoodTillDate: return "GoodTillDate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum TimeInForce [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, TimeInForce::Value m) + { + return os << TimeInForce::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h b/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h new file mode 100644 index 000000000..661320b77 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TRADEADDENDUM_H_ +#define _ILINKBINARY_TRADEADDENDUM_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201402L +# define SBE_CONSTEXPR_14 constexpr +#else +# define SBE_CONSTEXPR_14 +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +namespace iLinkBinary { + +class TradeAddendum +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)4, + Filled = (std::uint8_t)5, + TradeCancel = (std::uint8_t)100, + TradeCorrection = (std::uint8_t)101, + NULL_VALUE = (std::uint8_t)255 + }; + + static TradeAddendum::Value get(const std::uint8_t value) + { + switch (value) + { + case 4: return PartiallyFilled; + case 5: return Filled; + case 100: return TradeCancel; + case 101: return TradeCorrection; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum TradeAddendum [E103]"); + } + + static const char* c_str(const TradeAddendum::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case TradeCancel: return "TradeCancel"; + case TradeCorrection: return "TradeCorrection"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum TradeAddendum [E103]:"); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, TradeAddendum::Value m) + { + return os << TradeAddendum::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman/actors/ilink3/generated/generate.sh b/src/lib/orderman/actors/ilink3/generated/generate.sh new file mode 100755 index 000000000..200d1fd7e --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/generate.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# download xml +# sftp cmeconfig@sftpng.cmegroup.com:MSGW/NRCert/Templates/ilinkbinary.xml +# password: G3t(0nnect3d +docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.17.0.jar ilinkbinary.xml \ No newline at end of file diff --git a/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml b/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml new file mode 100644 index 000000000..6ef8c5cf9 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml @@ -0,0 +1,1584 @@ + + + + + IDEMPOTENT + 2 + 0 + 3 + 1 + 2 + RECOVERABLE + 0 + 8 + I + 4 + C + 5 + F + CME-1-SHA-256 + + + 8 + + 3 + 5 + 1 + 4 + U + U + C + 0 + 8 + C + 8 + 1 + + + + + + + + + + + + + + + + + + + + + Y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -9 + + + + -9 + + + + + + + + + + + + + + + + + 0 + 1 + 3 + + + 0 + 1 + + + 0 + 1 + + + 0 + 1 + + + G + S + + + C + D + G + H + W + Y + + + 1 + 2 + 3 + 4 + + + A + B + C + D + E + F + G + Z + + + 1 + 2 + + + A + P + + + 8 + 9 + 100 + 103 + 104 + 105 + 106 + 107 + 108 + + + G + H + + + 0 + 2 + + + 0 + 1 + + + 0 + 1 + + + A + D + + + 0 + 1 + + + 0 + 1 + + + 2 + 4 + + + 0 + 1 + + + 1 + 7 + 9 + 10 + 100 + + + 0 + 1 + 6 + + + 100 + 101 + + + 100 + 101 + + + 1 + 3 + 100 + + + 0 + 1 + 6 + + + 0 + 1 + + + 1 + 2 + + + G + H + + + 4 + 5 + + + 0 + 1 + 2 + 4 + 5 + 8 + C + U + + + 1 + 2 + 4 + K + + + 1 + 2 + 3 + 4 + K + + + 1 + 24 + 96 + 118 + 1000 + + + 0 + 5 + + + 1 + 3 + 4 + 5 + 100 + + + 1 + 3 + 4 + 100 + + + 1 + + + 1 + 2 + 8 + + + 0 + 2 + 3 + 4 + + + 0 + 1 + + + N + O + + + 1 + 2 + 5 + + + 0 + 1 + 2 + 3 + + + 1 + 2 + + + 1 + 2 + + + 0 + 3 + + + 0 + 1 + 2 + + + 0 + 1 + 3 + 4 + 6 + + + 4 + 5 + 100 + 101 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lib/orderman/actors/ilink3/generated/sbe-all-1.17.0.jar b/src/lib/orderman/actors/ilink3/generated/sbe-all-1.17.0.jar new file mode 100755 index 000000000..67ca54095 Binary files /dev/null and b/src/lib/orderman/actors/ilink3/generated/sbe-all-1.17.0.jar differ diff --git a/src/lib/orderman/actors/ilink3/test/IL3TestExchange.h b/src/lib/orderman/actors/ilink3/test/IL3TestExchange.h new file mode 100644 index 000000000..f4b9e2a41 --- /dev/null +++ b/src/lib/orderman/actors/ilink3/test/IL3TestExchange.h @@ -0,0 +1,248 @@ +#pragma once +#include "../IL3Dispatcher.h" +#include "../IL3ReceiveBuffer.h" +#include +#include +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { +namespace test { + +struct IL3TestExchange; +struct TestExchangeConnection : public IL3Connection { + bool connected; + IL3TestExchange& exchange; + IL3ConnectionHandler* handler; + bool is_backup; + + TestExchangeConnection(IL3TestExchange& te) : + connected(false), + exchange(te), + handler(nullptr), + is_backup(false) + {} + + void connect(IL3ConnectionHandler& h) override { + REQUIRE(connected == false); + handler = &h; + connected = true; + handler->on_connect_success(); + } + void disconnect() override { + REQUIRE(connected); + connected = false; + if (handler) handler->on_disconnect(); + } + void failover() override { is_backup = ! is_backup; } + void send(const std::string_view data) override { + REQUIRE(connected); + consume_messages(exchange, data.data(), data.size(), dispatch_exchange_message); + } + void send(const std::vector& data) override { + for(const auto& d : data) send(d); + } + + void respond(const std::string_view& data) { + REQUIRE(handler); + handler->on_data(data); + } +}; +struct RespondConnection : public IL3Connection { + TestExchangeConnection& _con; + std::vector _data; + RespondConnection(TestExchangeConnection& con): _con(con) { } + void connect(IL3ConnectionHandler&) override {} + void disconnect() override {} + void failover() override {} + void send(const std::string_view data) override { + _data.push_back(std::string {data} ); + } + void send(const std::vector& data) override { + std::string buffer; + for (const auto& d : data) buffer += d; + send(buffer); + } + void flush() { + for (const auto& d : _data) _con.respond(d); + } +}; + +struct ExchangeOrder { + uint64_t id; + int64_t price; + uint32_t qty; + int32_t security_id; +}; + +struct TestExchangeConfig { + bool reject_negotiate; + std::string expected_firm; + bool reject_establish_on_primary; +}; + +struct IL3TestExchange { + // What do you mean the exchange was supposed to handle multiple connections? That wasn't in the spec! + TestExchangeConnection connection; + uint64_t session; + uint32_t expected_seq; + uint32_t sequence; + uint32_t next_order_id; + std::map orders; + std::queue> work; + IL3MessageFramer buffer; + TestExchangeConfig config; + + std::string msg_log; + + IL3TestExchange() : + connection(*this), + session(0), + expected_seq(-1), + sequence(1), + next_order_id(1000), + orders(), + work(), + buffer() + {} + + IL3Connection& connect() { + return connection; + } + + // drain async work queue + void do_work() { + while(!work.empty()) { + work.front()(); + work.pop(); + } + } + + void respond(const char* msg) { + log(msg); + RespondConnection rc{connection}; + buffer.flush(rc); + work.push([rc]() mutable { + rc.flush(); + }); + } + + bool fill(uint64_t id) { + using namespace iLinkBinary; + // find order with id + auto iter = orders.find(id); + if (iter != orders.end()) { + // send a fill report + auto msg = buffer.frame( + ExecutionReportTradeOutright525::NoFills::sbeHeaderSize() + ); + msg.seqNum(this->sequence); + this->sequence += 1; + // msg. + respond("<- TradeOutright"); + return true; + } + return false; + } + + // void terminate() { + // auto t = buffer.frame(); + // t.uUID(this->session); + // respond("<- Terminate"); + // work.push([=]() { connection.disconnect(); }); + // } + + void log(const std::string& s) { msg_log += s; msg_log += " "; } + + iLinkBinary::FTI::Value fti_indicator() const { + return this->connection.is_backup ? iLinkBinary::FTI::Backup : iLinkBinary::FTI::Primary; + } + + void handle(const iLinkBinary::Negotiate500& n) { + log("-> Negotiate"); + this->session = n.uUID(); + if (!config.expected_firm.empty()) { + REQUIRE(config.expected_firm == n.firm()); + } + if (config.reject_negotiate) { + auto resp = buffer.frame(); + resp.errorCodes(10); + respond("<- NegotiationReject"); + } + else { + auto resp = buffer.frame(); + // we're cool, no previous session + resp.previousUUID(SBE_NULLVALUE_UINT64); + resp.previousSeqNo(0); + respond("<- NegotiationResponse"); + } + } + void handle(const iLinkBinary::Establish503& msg) { + log("-> Establish"); + if (this->session != msg.uUID()) { + auto resp = buffer.frame(); + resp.putReason("Session doesn't match"); + respond("<- EstablishmentReject"); + } + else if (this->config.reject_establish_on_primary && !connection.is_backup) { + auto resp = buffer.frame(); + resp.putReason("Gateway down"); + respond("<- EstablishmentReject"); + } + else { + this->expected_seq = msg.nextSeqNo(); + auto resp = buffer.frame(); + resp.nextSeqNo(this->sequence); + resp.keepAliveInterval(30000); + resp.faultToleranceIndicator(fti_indicator()); + respond("<- EstablishAck"); + } + } + void handle(const iLinkBinary::Sequence506& msg) { + log("-> Sequence"); + REQUIRE(msg.uUID() == this->session); + this->expected_seq = msg.nextSeqNo(); + auto seq = buffer.frame(); + // nextSeqNo is the expected sequence from customer to cme + seq.nextSeqNo(this->expected_seq); + seq.keepAliveIntervalLapsed(iLinkBinary::KeepAliveLapsed::NotLapsed); + seq.faultToleranceIndicator(fti_indicator()); + respond("<- Sequence"); + } + void handle(const iLinkBinary::RetransmitRequest508&) { + log("-> RetransmitRequest"); + } + void handle(const iLinkBinary::PartyDetailsDefinitionRequest518&) { + log("-> PartyDetailsDefinition"); + } + void handle(const iLinkBinary::NewOrderSingle514& msg) { + log("-> NewOrderSingle"); + // todo: check sender seq # + REQUIRE(msg.seqNum() == this->expected_seq); + this->expected_seq += 1; + ExchangeOrder order; + auto id = this->next_order_id += 1; + this->orders[id] = ExchangeOrder { id, 0, msg.orderQty(), msg.securityID() }; + + auto report = buffer.frame(); + report.seqNum(this->sequence); + this->sequence += 1; + report.uUID(this->session); + report.orderID(id); + report.orderQty(msg.orderQty()); + respond("<- ExecutionReportNew"); + } + void handle(const iLinkBinary::OrderCancelReplaceRequest515&) { + log("-> CancelReplace"); + } + void handle(const iLinkBinary::OrderCancelRequest516&) { + log("-> Cancel"); + } + +}; + + + +}}}}//namespace diff --git a/src/lib/orderman/actors/ilink3/test/ILinkGWTests.cpp b/src/lib/orderman/actors/ilink3/test/ILinkGWTests.cpp new file mode 100644 index 000000000..70f716dbf --- /dev/null +++ b/src/lib/orderman/actors/ilink3/test/ILinkGWTests.cpp @@ -0,0 +1,390 @@ +#include "catch/catch.hpp" + +#include "../IL3GW.h" +#include "../IL3MessageFramer.h" +#include "../generated/NewOrderSingle514.h" +#include "../generated/PartyDetailsDefinitionRequest518.h" +#include "../generated/Sequence506.h" +#include "../ILink3Utils.h" +#include "IL3TestExchange.h" +#include "../IL3ReceiveBuffer.h" +#include "lib/domain_model/Security.h" +#include "lib/utils/SecureLogon.h" + +#include +#include +#include + +namespace bts { +namespace orderman { +namespace ilink3 { +namespace test { + +#define DISABLED_CATCH_TESTCASE2( TestName, ... ) \ + [[maybe_unused]] static void TestName() +#define DISABLED_TEST_CASE( ... ) \ + DISABLED_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) + +const Session session_none = Session { 1024, 0, 0 }; + +struct DropHandler : public IL3ConnectionHandler { + void on_connect_success() override {}; + void on_disconnect() override {}; + size_t on_data(const std::string_view&) override { return 0; } +}; + +struct TestConnection : public IL3Connection { + IL3ConnectionHandler* handler; + std::function on_send; + bool connected; + bool failed_over; + TestConnection(std::function send) : + handler(nullptr), + on_send(send), + connected(false), + failed_over(false) + { } + + void connect(IL3ConnectionHandler& h) override { + REQUIRE(connected == false); + handler = &h; + connected = true; + handler->on_connect_success(); + } + void disconnect() override { + REQUIRE(connected); + connected = false; + if (handler) handler->on_disconnect(); + } + void failover() override {} + void send(const std::string_view data) override { + REQUIRE(connected); + on_send(data); + } + void send(const std::vector& data) override { + std::string buffer; + for(const auto& d : data) buffer += d; + send(buffer); + } +}; + + +const iLinkBinary::MessageHeader wrap_msg_header(const char* data, uint16_t message_size) { + iLinkBinary::MessageHeader mheader { + (char*)data, + sizeof(FramingHeader), + message_size, + iLinkBinary::MessageHeader::sbeSchemaVersion() }; + return mheader; +} + +template +const T wrap_msg(const char* data, uint16_t message_size) { + return T { + (char*)data, + sizeof(FramingHeader) + iLinkBinary::MessageHeader::encodedLength(), + message_size, + T::sbeBlockLength(), + T::sbeSchemaVersion() + }; +} + +TEST_CASE("ilink3 message framer", "[ilink3][execution]") { + using namespace iLinkBinary; + IL3MessageFramer framer; + size_t overhead = sizeof(FramingHeader) + MessageHeader::encodedLength(); + size_t expected_size = 0; + + // Frame 2 messages and then validate the buffer + auto msg = framer.frame( + // 2 headers, 1 for party details and 1 for trdRegPublications + 2 * PartyDetailsDefinitionRequest518::NoPartyDetails::sbeHeaderSize() + + PartyDetailsDefinitionRequest518::NoPartyDetails::sbeBlockLength() + ); + msg.seqNum(101); + msg.partyDetailsListReqID(1); + auto details = msg.noPartyDetailsCount(1); + details.next(); + details.putPartyDetailID("01234567890123456789"); + details.partyDetailRole(PartyDetailRole::CustomerAccount); + msg.noTrdRegPublicationsCount(0); + expected_size += + overhead + + msg.encodedLength(); + + // REQUIRE(!framer.overflow()); + auto order = framer.frame(); + order.securityID(42); + order.price().mantissa(to_price9(Price { 42.5 })); + order.seqNum(100); + expected_size += + overhead + + order.encodedLength(); + // REQUIRE(!framer.overflow()); + + bool send_called = false; + TestConnection con1 { [&send_called, expected_size](const std::string_view data) { + // Attempt to read: + // 2 framing headers + // 1 NewOrderSingle514 + // 1 PartyDetails + send_called = true; + const char* raw = data.data(); + const FramingHeader* header = reinterpret_cast(raw); + REQUIRE(header->encoding_type == 0xCAFE); + auto mheader = wrap_msg_header(raw, header->message_size); + // Inspect the party details + REQUIRE(mheader.templateId() == 518); + const auto pddr = wrap_msg(raw, header->message_size); + REQUIRE(pddr.seqNum() == 101); + + // advance to next + raw += header->message_size; + header = reinterpret_cast(raw); + REQUIRE(header->encoding_type == 0xCAFE); + mheader = wrap_msg_header(raw, header->message_size); + // Inspect the order + REQUIRE(mheader.templateId() == 514); + const auto nos = wrap_msg(raw, header->message_size); + REQUIRE(nos.seqNum() == 100); + REQUIRE(nos.securityID() == 42); + + REQUIRE(data.size() == expected_size); + }}; + DropHandler dh; + con1.connect(dh); + // flush 2 messages to con1 + framer.flush(con1); + + REQUIRE(send_called); + send_called = false; + + TestConnection con2 { [&send_called, &expected_size](const std::string_view data) { + send_called = true; + const char* raw = data.data(); + const FramingHeader* header = reinterpret_cast(raw); + REQUIRE(header->encoding_type == 0xCAFE); + auto mheader = wrap_msg_header(raw, header->message_size); + REQUIRE(mheader.templateId() == 506); + const auto seq = wrap_msg(raw, header->message_size); + REQUIRE(seq.uUID() == 123456); + REQUIRE(data.size() == expected_size); + }}; + con2.connect(dh); + auto seq = framer.frame(); + seq.uUID(123456); + expected_size = + sizeof(FramingHeader) + + MessageHeader::encodedLength() + + seq.encodedLength(); + framer.flush(con2); + REQUIRE(send_called); +} + +template +bool all_equal(const T& sequence, const V& value) { + for (const auto& i : sequence) { + if (i != value) return false; + } + return true; +} + +TEST_CASE("ilink3 receive buffer", "[ilink3][execution]") { + IL3ReceiveBuffer buffer(128); + REQUIRE(buffer.unread() == 0); + // write 100 chars, attempt to read them + char input[100]; + auto size = sizeof(input); + for (size_t x = 0; x < size; ++x) { input[x] = '#'; } + std::string_view input_sv(input, size); + // Append new data to the read buffer + buffer.append(input_sv); + // read buffer should indicate 100 bytes available to read + REQUIRE(buffer.unread() == 100); + auto data1 = buffer.data(); + REQUIRE(data1.size() == 100); + REQUIRE(all_equal(data1, '#')); + // Advance 10 bytes + buffer.advance(10); + // unread should go down + REQUIRE(buffer.unread() == sizeof(input) - 10); + // Advance but leave 10 #'s in the buffer + buffer.advance(80); + REQUIRE(buffer.unread() == 10); + // apend 100 '%', this will overflow initial size and require an internal copy + for (size_t x = 0; x < sizeof(input); ++x) { input[x] = '%'; } + buffer.append(input_sv); + REQUIRE(buffer.unread() == 110); + REQUIRE(all_equal(buffer.data().substr(0,10), '#')); + REQUIRE(all_equal(buffer.data().substr(10), '%')); + buffer.advance(110); + // Write 10 more bytes to test the non-overflow path + for (size_t x = 0; x < sizeof(input); ++x) { input[x] = '!'; } + buffer.append(std::string_view(input, 12)); + REQUIRE(buffer.unread() == 12); + REQUIRE(buffer.data().size() == 12); + REQUIRE(all_equal(buffer.data(), '!')); +} + +DISABLED_TEST_CASE("EstablishExistingSession", "[ilink3]") { + IL3TestExchange exchange; + auto& connection = exchange.connect(); + // New session starts at 1 + Session session = session_none; + // Set the exchange to know about our session + exchange.session = session.uuid; + Config config { "NGG", "004", false , {}}; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config ,{}}; + gw.connect(); + exchange.do_work(); + + REQUIRE(exchange.session == session.uuid); + REQUIRE(exchange.expected_seq == session.to_cme); + REQUIRE(exchange.msg_log == "-> Establish <- EstablishAck -> Sequence <- Sequence "); +} + +// +// Certification tests here +// https://www.cmegroup.com/tools-information/webhelp/autocert-ilink/Content/ACPiLinkUserManual.pdf +// + +DISABLED_TEST_CASE("BeginningOfWeekLogon", "[ilink3][cert]") { + // Simplest scenario. Log in with no replay + + IL3TestExchange exchange; + auto& connection = exchange.connect(); + // New session starts at 1 + Session session = session_none; + Config config { "NGG", "004", false,{} }; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config ,{}}; + gw.subscribe_session([&](auto&s) { session = s; }); + + gw.connect(); + exchange.do_work(); + REQUIRE(exchange.session == session.uuid); + REQUIRE(exchange.expected_seq == session.to_cme); + REQUIRE(exchange.msg_log == "-> Negotiate <- NegotiationResponse -> Establish <- EstablishAck -> Sequence <- Sequence "); +} + + +DISABLED_TEST_CASE("PrimaryGatewayConnectionEnforcement", "[ilink3][il3cert]") { + IL3TestExchange exchange; + auto& connection = exchange.connect(); + Session session = session_none; + exchange.session = session.uuid; + exchange.config.reject_establish_on_primary = true; + Config config { "NGG", "004", true, {} }; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config ,{}}; + gw.connect(); + exchange.do_work(); + REQUIRE(gw.state() == State::READY); + REQUIRE(exchange.msg_log == "-> Establish <- EstablishmentReject -> Establish <- EstablishAck -> Sequence <- Sequence "); +} + +DISABLED_TEST_CASE("Re-SettingUUID", "[ilink3][il3cert]") { + // -> Establish w/ existing session + // <- receive a terminate + // Negotiate a new session id + // -> Negotiate + // -> Establish + // -> Sequence + IL3TestExchange exchange; + auto& connection = exchange.connect(); + // Existing session starts >1. Will attempt to establish + { + Session session { 1234, /*out*/ 5, /*in*/ 17 }; + Config config { "NGG", "004", false, {} }; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config,{} }; + gw.connect(); + exchange.do_work(); + REQUIRE(gw.state() == State::ERROR); + REQUIRE(exchange.msg_log == "-> Establish <- EstablishmentReject "); + } + + Session session = session_none; + Config config { "NGG", "004", false, {} }; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config, {} }; + // send establish + gw.connect(); + exchange.do_work(); + REQUIRE(gw.state() == State::READY); + REQUIRE(exchange.msg_log == "-> Establish <- EstablishmentReject -> Negotiate <- NegotiationResponse -> Establish <- EstablishAck -> Sequence <- Sequence "); +} + +api::Security create_future() { + api::Security s; + s.mutable_glbx()->set_exchange_id(101); + s.mutable_future()->set_expiration_year(2021); + s.mutable_future()->set_expiration_month(1); + s.mutable_future()->set_expiration_day(1); + return s; +} + +DISABLED_TEST_CASE("OutrightVanillaOrder", "[ilink3][execution]") { + IL3TestExchange exchange; + // simulated socket transport + auto& connection = exchange.connect(); + // New session starts at 1 + Session session = session_none; + Config config { "NGG", "004", false, {} }; + IL3MessageFramer f; + IL3GW gw { connection, f, nullptr, session, config, {} }; + gw.subscribe_session([&](auto&s) { session = s; }); + + // -> connect + // -> Negotiate + // <- NegotiationResponse + // -> Establish + // <- EstablishAck + // -> NewOrder + // <- ExecutionReportNew + // <- ExecutionReportTradeOutright525 + + gw.connect(); + exchange.do_work(); + REQUIRE(exchange.session == session.uuid); + REQUIRE(exchange.msg_log == "-> Negotiate <- NegotiationResponse -> Establish <- EstablishAck -> Sequence <- Sequence "); + + CreateOrderMsg order {}; + order.key = OrderKey { 70 }; + order.price = Price { 0.14 }; + order.quantity = Quantity { 199 }; + order.display_quantity = Quantity { 199 }; + order.side = api::Side::SIDE_BUY; + order.manual_order_indicator = api::orderman::MANUAL_ORDER_INDICATOR_YES; + auto security = create_future(); + order.security = &security; + order.time_in_force = api::orderman::TIME_IN_FORCE_DAY; + api::orderman::RoutingRecord routing_record; + order.routing_record = &routing_record; + routing_record.set_operator_id("Test"); + routing_record.set_location("TTT"); + + size_t exe_reports = 0; + gw.subscribe_execution_reports( + [&](const ExecutionReport*) { exe_reports += 1; } + ); + + gw.send_order(order); + gw.flush(); + exchange.do_work(); + REQUIRE(exchange.orders.size() == 1); + REQUIRE(exe_reports == 0); + for (const auto& p : exchange.orders) { + // fill queues up work + exchange.fill(p.first); + } + // do_work flushes + exchange.do_work(); + + REQUIRE(exe_reports == 1); + + // REQUIRE(exchange.orders.size() == 1); +} + +}}}}//namespace diff --git a/src/lib/orderman/actors/order_manager/OrderManager.cpp b/src/lib/orderman/actors/order_manager/OrderManager.cpp index 4c52d5edb..252b5968c 100644 --- a/src/lib/orderman/actors/order_manager/OrderManager.cpp +++ b/src/lib/orderman/actors/order_manager/OrderManager.cpp @@ -468,9 +468,8 @@ void OrderManager::init_order_services() { publish(s_ptr->gw_status_change_pub, gw_name, b); }; s->cancel_reject_pub = make_stream(gw_name); - s->gw->on_cancel_reject() = [s_ptr, this](auto const &k, - auto const &msg) { - publish(s_ptr->cancel_reject_pub, k, msg); + s->gw->on_cancel_reject() = [s_ptr, this](auto const&cr) { + publish(s_ptr->cancel_reject_pub,cr); }; // handlers are ready so we can start processing fix events s->gw->start(); @@ -559,28 +558,34 @@ void OrderManager::after_event() { if (me->state == State::READY) { me->services_data.cor_id = trace::CorID{}; for (auto &osd : me->services_data.sessions) { - auto &fix_stream = osd->current_buffer->first_stream(); + auto &fix_stream = osd->buffered_fix_msgs->first_stream(); if (fix_stream.n_msgs()) { auto scoped_do_work = trace::log_scope(me->services_data.log, {}, "OrderManager::after_event"); fix_stream.close(); - osd->gw->send_fix(osd->current_buffer, osd->current_trace); + osd->gw->send_fix(osd->buffered_fix_msgs, osd->current_trace); reload_fix_buffer(*osd); } + + auto &queued_ops = osd->buffered_order_msgs; + if (queued_ops.size()) { + osd->gw->send_msgs(queued_ops,osd->current_trace); + queued_ops.clear(); + } } } } void OrderManager::reload_fix_buffer(SessionServicesData &osd) { if (osd.free_buffers.size()) { - osd.current_buffer = osd.free_buffers.back(); + osd.buffered_fix_msgs = osd.free_buffers.back(); osd.free_buffers.pop_back(); } else { LOG(OrderMan, Warn, "Ran out of fix buffers in {}. Will allocate directly. " "This will have an impact on performance", osd.cfg.name()); - osd.current_buffer = std::make_shared(osd.cfg); + osd.buffered_fix_msgs = std::make_shared(osd.cfg); } } diff --git a/src/lib/orderman/actors/order_manager/OrderServices.h b/src/lib/orderman/actors/order_manager/OrderServices.h index 44e393021..0c83d77e5 100644 --- a/src/lib/orderman/actors/order_manager/OrderServices.h +++ b/src/lib/orderman/actors/order_manager/OrderServices.h @@ -58,6 +58,11 @@ class OrderServices { ss.queue_fix(mt, f, corid()); } + template + void queue_order_msg (SessionServices &ss, OP const&msg) { + ss.queue_order_msg(msg,corid()); + } + void log(const char *entry_kind, uint64_t uint64_1 = 0, const char *txt_1 = "", uint32_t uint32_1 = 0) { _data->log.log(corid(), entry_kind, uint64_1, txt_1, uint32_1); diff --git a/src/lib/orderman/actors/order_manager/OrderServicesData.h b/src/lib/orderman/actors/order_manager/OrderServicesData.h index a5f82fa7c..446d5bc52 100644 --- a/src/lib/orderman/actors/order_manager/OrderServicesData.h +++ b/src/lib/orderman/actors/order_manager/OrderServicesData.h @@ -56,7 +56,7 @@ struct SessionServicesData { governor(cfg.max_order_msgs_per_window(), cfg.window_duration_msecs()), gw(ExecutionGatewayFactory::create_gateway(cfg, log, o)) { - + buffered_order_msgs.reserve(1000); } std::string session; @@ -72,7 +72,12 @@ struct SessionServicesData { gateway_status_subs; Governor governor; - jetfix::OutFIXPtr current_buffer; + + // only one of these will actually be in use. This is messy but expedient + // in that it minimizes the modifications to existing FIX generation code + jetfix::OutFIXPtr buffered_fix_msgs; + std::vector buffered_order_msgs; + trace::CorID current_trace; std::unique_ptr gw; mercury::Stream exe_report_pub; diff --git a/src/lib/orderman/actors/order_manager/SessionServices.h b/src/lib/orderman/actors/order_manager/SessionServices.h index 5ace9ced5..110cfc4d9 100644 --- a/src/lib/orderman/actors/order_manager/SessionServices.h +++ b/src/lib/orderman/actors/order_manager/SessionServices.h @@ -57,23 +57,31 @@ class SessionServices { _gateway_status_sub = src._gateway_status_sub; return *this; } - + config::JetFIX::Connection const &session_cfg() const { return _session_data->cfg; - } + } protected: std::string const &session_name() const { return _session_data->session; } void queue_fix(jetfix::MessageTypes mt, jetfix::FIXFragment const &f, trace::CorID const &corid) { - auto &stream = _session_data->current_buffer->first_stream(); + auto &stream = _session_data->buffered_fix_msgs->first_stream(); stream.new_msg(mt).append(f); if (stream.n_msgs() == 1) _session_data->current_trace = corid; } + template + void queue_order_msg (const OP &order_op, trace::CorID const &corid) { + auto &buffer = _session_data->buffered_order_msgs; + buffer.emplace_back(OrderMsg {order_op}); + if (buffer.size() == 1) + _session_data->current_trace = corid; + } + bool is_gateway_connected() const { return _session_data->gw_connected; } Governor &governor() { return _session_data->governor; } @@ -105,4 +113,5 @@ class SessionServices { } }; -}} +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/doc/ilink3.org b/src/lib/orderman/doc/ilink3.org new file mode 100644 index 000000000..24675fa5d --- /dev/null +++ b/src/lib/orderman/doc/ilink3.org @@ -0,0 +1,179 @@ +* iLink3 Reference Documentation +** Overview +The iLink3 work leverages and extends the iLink2 functionality. Most of the order management logic is unchanged from iLink2 with the substantial changes being confined to session management and encoding/decoding. In an effort to facilitate future addition of new execution protocols a set of protocol independent data structures and methods was added. +** Main classes +*** GLBXNativeorder +GLBXNativeOrder implements the common iLink2 and iLink3 order management logic, including status updates, buffering of cancel/updates, recovery from disk, handling of execution reports, special order handling and routing. This is essentially unchanged from iLink2. From the point of view of this class the differences between iLink2 and iLink2 are delegated to the IGLBXOrderEncoder interface. At run time depending on the type of connection used an implementation of this interface for iLink2 or iLink3 is selected. +*** IGLBXOrderEncoder +Implementations of the IGLBXOrderEncoder interface below realize wire protocol specific implementations of encoding allowing GLBXNativeOrder to manage both iLink2 and iLink3 orders. The interface provides methods for creating,updating, canceling and dispatching orders. Currently there are two concrete implementations of this interface: iLink2OrderEncoder and iLink3OrderEncoder. + +#+BEGIN_SRC c++ +class IGLBXOrderEncoder { + public: + virtual ~IGLBXOrderEncoder() {} + virtual void init(OrderKey key, api::orderman::RoutingRecord const &, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int price_encoding_precision, + bool stop_order_has_been_triggered) = 0; + + virtual void update_exchange_order_id(ExchangeOrderIDVar const&) = 0; + + virtual void update_create_order_encoding(Price p, int price_precision, + Quantity q, OrderServices &) = 0; + + virtual void update_cancel_replace_stop_px(Price stop_px, + int price_precision) = 0; + virtual void update_cancel_replace_max_show(Quantity max_show) = 0; + virtual void update_cancel_replace_encoding(Price p, int price_precision, + Quantity q, OrderServices &) = 0; + virtual void update_cancel_replace_encoding(Quantity q, OrderServices &) = 0; + virtual void update_cancel_replace_encoding(Price p, + int price_precision, + OrderServices &) = 0; + virtual void update_cancel_encoding(OrderServices&) = 0; + virtual void send_create(OrderServices&,SessionServices&) = 0; + virtual void send_cancel_replace(OrderServices&,SessionServices&) = 0; + virtual void send_cancel(OrderServices&,SessionServices&) = 0; +}; + + #+END_SRC +*** class iLink2OrderEncoder : public IGLBXOrderEncoder +iLink2OrderEncoder provides FIX based encoding of GLBX orders. This logic is carried over essentially unchanged from previous versions of Spark with care being taken to re-use as much as possible elements of previous encodings on every call. The generated FIX messages are forwarded, as FIX, to the OrderServices::queue_fix template member function: + +#+BEGIN_SRC c++ +void queue_fix(SessionServices &ss, jetfix::MessageTypes mt, + jetfix::FIXFragment const &f) { + ss.queue_fix(mt, f, corid()); +} + #+END_SRC + +*** class iLink3OrderEncoder : public IGLBXOrderEncoder +iLink3OrderEncoder provides a thin adapter that accepts order encoding requests from GLBXNativeOrder and maps those requests to the protocol agnostic order management data structures: CreateOrderMsg, CancelReplaceOrderMsg and CancelOrderMsg. + +After this mapping, iLink3OrderEncoder forwards the order operation in question to its OrderServices instance, through the protocol independent queue_order_msg template function: + +#+BEGIN_SRC c++ + template + void queue_order_msg (SessionServices &ss, OP const&msg) { + ss.queue_order_msg(msg,corid()); + } + #+END_SRC + +*** Protocol independent order operation data structures +The simple data structures in IExecutionGateway.h provide an exchange protocol independent way of representing order operations. They are intended to facilitate the addition of new exchange protocols. They are as follows: + +#+BEGIN_SRC c++ + struct CreateOrderMsg { + OrderKey key; + Price price; + Quantity quantity; + api::Security const *security; + api::Side side; + Price stop_px; + Quantity display_quantity; + api::orderman::NativeOrderType order_type; + api::orderman::TimeInForce time_in_force; + api::orderman::ManualOrderIndicator manual_order_indicator; + api::orderman::RoutingRecord const *routing_record; + }; + + struct CancelReplaceOrderMsg { + CreateOrderMsg create_fields; + ExchangeOrderID64 exchange_order_id; + }; + + struct CancelOrderMsg { + OrderKey key; + ExchangeOrderID64 exchange_order_id; + api::orderman::ManualOrderIndicator manual_order_indicator; + api::Security const *security; + api::orderman::RoutingRecord const *routing_record; + api::Side side; + }; + + using OrderMsg = + std::variant; + + #+END_SRC + +These data structures are used as vocabulary data types understood by all future exchange execution implementation code. They are consumed by implementations of the IExecutionGateway interface. + +*** class IExecutionGateway +IExecutionGateway provides an abstraction for the implementation of exchange gateways. It provides methods for both FIX and non FIX based exchanges. Ordinarily implementations of this interface will either provide FIX or non FIX functionality but not both. + +#+BEGIN_SRC c++ +class IExecutionGateway { + public: + IExecutionGateway() = default; + virtual ~IExecutionGateway() {} + + virtual void start() = 0; + virtual void dispatch_incoming_fix_messages() = 0; + virtual void on_securities(const mercury::Update &) = 0; + virtual void on_admin_data(const mercury::Update &) = 0; + virtual void send_fix(const jetfix::OutFIXPtr&, trace::CorID) = 0; + virtual void send_msgs(std::vector const&, trace::CorID) = 0; + virtual OnExeReport& on_exe_report() = 0; + virtual OnGwStatusChange& on_gw_status_change() = 0; + virtual OnCancelReject &on_cancel_reject() = 0; +private: + BTS_NO_COPY(IExecutionGateway); +}; + #+END_SRC + + IExecutionGateway implements are responsible for establishing execution sessions as well as mapping to and from protocol independent order operations to their gateway specific implementations. Presently there are three implementations of IExecutionGateway: ICE, iLink2 and iLink3. Only the iLink3 implementation is new. + +*** class GLBXiLink3ExecutionGateway : public IExecutionGateway +This class implements provides a facade that hides, coordinates and interfaces with all the components needed to implement an iLink3 gateway including a TCP connection, a persistent store and the actual iLink3 encoding/decoding logic. GLBXiLink3ExecutionGateway role is identical to those of the GLBXExecutionGateway and ICEExecutionGateway, which existed prior to iLink3. In essence GLBXilink3executiongateway is in charge of managing the life-cycle of an iLink3 exchange connection as well as translating between exchange agnostic order operations and the iLink3 specific interfaces. The actual exchange interaction is delegated to the IL3GW class. +*** class IL3GW : IL3ConnectionHandler +The IL3GW class is responsible for iLink3 session management, including login, logout, recovery and heartbeat response. Additionally this class is responsible for mapping order messages to and from their network binary representation. This class is able to handle network events including connection, disconnection and data arrival via its implementation of the IL3ConnectionHandler interface: + + +#+BEGIN_SRC c++ +struct IL3ConnectionHandler { + virtual ~IL3ConnectionHandler() ; + virtual void on_connect_success() = 0; + virtual void on_disconnect() = 0; + // Send available data and length. Handler will return what it consumed + virtual size_t on_data(const std::string_view&) = 0; +}; + #+END_SRC + +IL3GW integrates these external events with the instructions it receives from the rest of the system through its public interface: + +#+BEGIN_SRC c++ + void connect(); + void send_order(const CreateOrderMsg &); + void send_cancel_replace(const CancelReplaceOrderMsg &); + void send_cancel(const CancelOrderMsg &); + void send_terminate(uint16_t code = 0); + #+END_SRC + + And provides an integrated high-level view of the connection state via its event callbacks: + +#+BEGIN_SRC c++ + void subscribe_state(OnStateChange o); + void subscribe_execution_reports(OnExecutionReport sub); + void subscribe_session(OnSessionChange cb); + void subscribe_cancel_reject(OnCancelReject cb); + #+END_SRC + +** Code Generation +To facilitate encoding IL3GW uses code generated by the CME sponsored tools by real logic. These tools can be found here: + +https://github.com/real-logic/simple-binary-encoding/wiki/Sbe-Tool-Guide + +The CME provides template files that be used as an input to these tools. For more details see: + +https://www.cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+-+Simple+Binary+Encoding + +The generation was done manually and the generated code integrated into source control. + +** Operational Notes +- Like iLink2, the iLink3 implementation uses weekly sessions +- Sessions are stored under sparkdata/ilink3/session_name/date-of-session +- Within each session directory there are two files: + - log: is a json log of all messages sent and received from the exchange + - seqnum: contains the current sequence numbers for the session. Additionally the session binary name is also represented for use in trouble-shooting + diff --git a/src/lib/orderman/events/CancelRejectEvent.h b/src/lib/orderman/events/CancelRejectEvent.h index b173c2022..7e02c17d5 100644 --- a/src/lib/orderman/events/CancelRejectEvent.h +++ b/src/lib/orderman/events/CancelRejectEvent.h @@ -4,30 +4,27 @@ #include "lib/api/services/OrderService.pb.h" #include "lib/domain_model/common.h" -#include "lib/orderman/orderman_utils/orderman_common.h" #include "lib/mercury/events/Event.h" #include "lib/mercury/synopsis/NoSynopsis.h" +#include "lib/orderman/orderman_utils/CancelReject.h" +#include "lib/orderman/orderman_utils/orderman_common.h" namespace bts { namespace orderman { -class CancelRejectEvent : public mercury::Event -{ -public: -// Cancel Rejects are informative only, they have no effect on order -// state. So either they are conveyed to the user when they occur or -// they can be discarded. So no need for synopsis. - using SynopsisPolicy = mercury::NoSynopsis; +class CancelRejectEvent : public mercury::Event { + public: + using SynopsisPolicy = mercury::NoSynopsis; using Tag = GatewayName; - - CancelRejectEvent (OrderKey order_key, std::string const &rej) : - order_key(order_key), reject_msg(rej) - {} - OrderKey key() const{return order_key;} - OrderKey order_key; - std::string reject_msg; + CancelRejectEvent(CancelReject const &cr) : reject(cr) {} + OrderKey key() const { return reject.order_key; } + std::string const &reject_msg() const { return reject.reject_msg; } + CancelRejectReason reason() const {return reject.reason;} + + private: + CancelReject reject; }; -}} - +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/events/OrderStateUpdateEvent.h b/src/lib/orderman/events/OrderStateUpdateEvent.h index 6c170fb5b..f47bdf326 100644 --- a/src/lib/orderman/events/OrderStateUpdateEvent.h +++ b/src/lib/orderman/events/OrderStateUpdateEvent.h @@ -47,6 +47,7 @@ public: auto native_state = get_native_state(state); if (native_state) { exchange_order_id = native_state->exchange_order_id(); + exchange_order_id_u64 = native_state->exchange_order_id_u64(); last_msg_seq_num = native_state->last_msg_seq_num(); sub_error_code = native_state->sub_error_code(); native_status = native_state->native_status(); @@ -54,6 +55,8 @@ public: native_type = native_state->native_type(); orderman::str_to(native_state->last_transact_time(), &last_transact_time); + last_transact_time_unix_ns = + ExchangeTimeStamp64{native_state->last_transact_time_unix_ns()}; stop_px = native_state->stop_px(); } } @@ -77,12 +80,14 @@ public: // native order state std::string exchange_order_id; + uint64_t exchange_order_id_u64; uint64_t last_msg_seq_num; api::orderman::NativeOrderState::SubError sub_error_code; api::orderman::NativeOrderStatus native_status; api::orderman::RoutingRecord routing_record; api::orderman::NativeOrderType native_type; - mercury::TimeStampStr last_transact_time; + orderman::ExchangeTimeStampStr last_transact_time; + ExchangeTimeStamp64 last_transact_time_unix_ns; double stop_px; // dynamic order state @@ -184,12 +189,14 @@ private: void rebuild_native_state(api::orderman::NativeOrderState *st) const { st->set_stop_px(stop_px); st->set_exchange_order_id(exchange_order_id); + st->set_exchange_order_id_u64(exchange_order_id_u64); st->set_last_msg_seq_num(last_msg_seq_num); st->set_sub_error_code(sub_error_code); st->set_native_status(native_status); *st->mutable_routing_record() = routing_record; st->set_native_type(native_type); st->set_last_transact_time(to_str(last_transact_time)); + st->set_last_transact_time_unix_ns(last_transact_time_unix_ns.value()); } api::orderman::NativeOrderState const * diff --git a/src/lib/orderman/order_factory/OrderFactory.cpp b/src/lib/orderman/order_factory/OrderFactory.cpp index bfae664c5..58f9b5e5b 100644 --- a/src/lib/orderman/order_factory/OrderFactory.cpp +++ b/src/lib/orderman/order_factory/OrderFactory.cpp @@ -10,7 +10,6 @@ // order types #include "lib/orderman/order_factory/DynamicOrderRegistry.h" #include "lib/orderman/orders/DynamicOrder.h" -#include "lib/orderman/orders/GLBXNativeOrder.h" #include "lib/orderman/orders/ICENativeOrder.h" #include "lib/orderman/orders/TimeBoxOrder.h" #include "lib/orderman/orders/TriggerOrder.h" @@ -30,6 +29,7 @@ #include "lib/orderman/orders/spreader_orders/SpreaderOrder.h" #include "lib/orderman/orders/CompositeOrder.h" #include "lib/orderman/orders/queue_holder/QueueHolderOrder.h" +#include "lib/orderman/orders/GLBXNativeOrder.h" #include #include diff --git a/src/lib/orderman/orderman_utils/CancelReject.h b/src/lib/orderman/orderman_utils/CancelReject.h new file mode 100644 index 000000000..43457b6fc --- /dev/null +++ b/src/lib/orderman/orderman_utils/CancelReject.h @@ -0,0 +1,22 @@ +#pragma once + +#include "lib/orderman/orderman_utils/orderman_common.h" +#include + +namespace bts { +namespace orderman { + +enum class CancelRejectReason { + UnknownOrder, Other +}; + +class CancelReject { +public: + OrderKey order_key; + CancelRejectReason reason; + std::string reject_msg; +}; + + + +}} diff --git a/src/lib/orderman/orderman_utils/ExecutionReport.h b/src/lib/orderman/orderman_utils/ExecutionReport.h index 5ffc627b3..13ed06717 100644 --- a/src/lib/orderman/orderman_utils/ExecutionReport.h +++ b/src/lib/orderman/orderman_utils/ExecutionReport.h @@ -4,6 +4,8 @@ #include "lib/orderman/orderman_utils/orderman_common.h" #include "lib/mercury/common/mercury_common.h" #include "lib/config/protos/jetfix.pb.h" +#include +#include "lib/utils/overloaded.h" namespace bts { namespace orderman { @@ -22,7 +24,7 @@ public: api::orderman::ExecType exec_type; api::orderman::NativeOrderStatus order_status; api::orderman::ManualOrderIndicator manual_order_indicator; - ExchangeOrderID exchange_order_id; + ExchangeOrderIDVar exchange_order_id; Price price; Quantity quantity; Quantity filled_quantity; @@ -32,7 +34,7 @@ public: Price avg_price; Price stop_price; ExchangeFillID exchange_fill_id; - mercury::TimeStampStr transact_time; + ExchangeTimeStampVar transact_time; config::JetFIX::Connection const *cfg; std::string cust_order_handling_inst; std::string msg; @@ -40,6 +42,19 @@ public: int64_t ice_cl_ord_id; int32_t ice_company_id; std::string memo; + + void get_ts(orderman::ExchangeTimeStampStr *ts_str, + ExchangeTimeStamp64 *ts_64) const { + std::visit (overloaded { + [ts_str,ts_64] (orderman::ExchangeTimeStampStr const&str) { + ts_64->value() = 0; + *ts_str = str; + }, + [ts_str,ts_64] (ExchangeTimeStamp64 ts) { + *ts_64 = ts; + memset(ts_str->value().data(),0,ts_str->value().size()); + }},transact_time); + } }; }} diff --git a/src/lib/orderman/orderman_utils/fix_order_codec.h b/src/lib/orderman/orderman_utils/fix_order_codec.h index 14cceb2ce..e2e16f653 100644 --- a/src/lib/orderman/orderman_utils/fix_order_codec.h +++ b/src/lib/orderman/orderman_utils/fix_order_codec.h @@ -31,9 +31,8 @@ inline void encode_clorid(OrderKey ok, SecurityKey sk, std::string *out) { u32_toa(ok.value(), &((*out)[clordid_sz() / 2]), clordid_sz() / 2); } -inline void decode_clorid(std::string const &in, OrderKey *ok, +inline void decode_clorid(const char*in, OrderKey *ok, SecurityKey *sk) { - bts_assert(in.size() == clordid_sz()); char buffer[clordid_sz() / 2 + 1]; buffer[clordid_sz() / 2] = 0; @@ -44,6 +43,12 @@ inline void decode_clorid(std::string const &in, OrderKey *ok, *ok = OrderKey(std::atoi(buffer)); } +inline void decode_clorid(std::string const &in, OrderKey *ok, + SecurityKey *sk) { + bts_assert(in.size() == clordid_sz()); + decode_clorid(in.data(),ok,sk); +} + template OrderKey get_order_key(MSG const &msg) { bts_assert(msg.template has()); diff --git a/src/lib/orderman/orderman_utils/orderman_common.h b/src/lib/orderman/orderman_utils/orderman_common.h index 14fe0aec1..1e0280476 100644 --- a/src/lib/orderman/orderman_utils/orderman_common.h +++ b/src/lib/orderman/orderman_utils/orderman_common.h @@ -4,40 +4,36 @@ #include #include #include +#include +#include "lib/api/services/OrderService.pb.h" #include "lib/domain_model/common.h" #include "lib/utils/ValueWrapper.h" #include "lib/utils/bts_assert.h" #include "lib/utils/bts_chrono.h" -#include "lib/api/services/OrderService.pb.h" +#include "lib/utils/overloaded.h" namespace bts { namespace api { class Security; } namespace orderman { +using SecurityPtr = const api::Security *; using AccountID = utils::ValueWrapper; using UserID = utils::ValueWrapper; using OrderKey = utils::ValueWrapper; using OperatorID = - utils::ValueWrapper>; + utils::ValueWrapper>; using AccountName = utils::ValueWrapper>; using GatewayName = utils::ValueWrapper; using ExchangeFillID = utils::ValueWrapper>; -using ExchangeOrderID = - utils::ValueWrapper>; -using OrderTimeStamp = - utils::ValueWrapper>; -using SecurityPtr = const api::Security *; - const uint16_t NullTickToTradeCorID = 0; const auto fix_buffer_pool_size = 10000; -template -void to_array(std::string const &str, std::array *out) { +template +void to_array(S const &str, std::array *out) { auto &result = *out; bts_assert(str.size() <= N); memset(&result[0], ' ', N); @@ -50,13 +46,13 @@ void to_str(std::array const &in, std::string *out) { result = std::string(&in[0], N); } -template T to(std::string const &str) { +template T to(S const &str) { T result; to_array(str, &result.value()); return result; } -template void str_to(std::string const &str, T *out) { +template void str_to(S const &str, T *out) { to_array(str, &out->value()); } @@ -69,17 +65,18 @@ template inline std::string to_str(T const &t) { template std::pair find_trim_str(std::array const &in) { auto i = N; - for (; i!= 0; i--) - if (in[i-1] != ' ') + for (; i != 0; i--) + if (in[i - 1] == ' ' || in[i - 1] == 0) + continue; + else break; return std::make_pair(&in[0], i); } -template -std::string to_trim_str(T const&t) { +template std::string to_trim_str(T const &t) { auto ts = find_trim_str(t.value()); - return std::string(ts.first,ts.second); + return std::string(ts.first, ts.second); } inline bool in_terminal_state(bts::api::orderman::OrderStatus order_status) { @@ -90,4 +87,70 @@ inline bool in_terminal_state(bts::api::orderman::OrderStatus order_status) { api::orderman::OrderStatus::ORDER_STATUS_REJECTED_BY_SPARK; } -}} // namespace bts +// Exchange order ids +using ExchangeOrderID = + utils::ValueWrapper>; +using ExchangeOrderID64 = + utils::ValueWrapper; +// Exchange timestamps +using ExchangeTimeStampStr = + utils::ValueWrapper>; +using ExchangeTimeStamp64 = + utils::ValueWrapper; + +#if __cplusplus >= 201703L +using ExchangeTimeStampVar = + std::variant; +using ExchangeOrderIDVar = std::variant; + +inline ExchangeOrderIDVar +get_exchange_order_id(api::orderman::NativeOrderState const &st) { + if (st.exchange_order_id().size()) { + ExchangeOrderID result; + str_to(st.exchange_order_id(), &result); + return result; + } else { + return ExchangeOrderID64{st.exchange_order_id_u64()}; + } +} +inline void set_exchange_order_id(ExchangeOrderIDVar const &v, + api::orderman::NativeOrderState *out) { + std::visit(overloaded{[out](ExchangeOrderID const &str) { + out->set_exchange_order_id_u64(0); + *(out->mutable_exchange_order_id()) = to_trim_str(str); + }, + [out](ExchangeOrderID64 oid) { + out->set_exchange_order_id_u64(oid.value()); + out->clear_exchange_order_id(); + }}, + v); +} + +inline ExchangeTimeStampVar +get_last_transact(api::orderman::NativeOrderState const&st) { + if (st.last_transact_time().size()) { + ExchangeTimeStampStr result; + str_to(st.last_transact_time(),&result); + return result; + } + else { + return ExchangeTimeStamp64 {st.last_transact_time_unix_ns()}; + } +} +inline void set_last_transact_time(ExchangeTimeStampVar const&v, + api::orderman::NativeOrderState *out) { + std::visit(overloaded{[out](ExchangeTimeStampStr const &str) { + out->set_last_transact_time_unix_ns(0); + *(out->mutable_last_transact_time()) = to_trim_str(str); + }, + [out](ExchangeTimeStamp64 ts) { + out->set_last_transact_time_unix_ns(ts.value()); + out->clear_last_transact_time(); + }}, + v); +} +#endif + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/GLBXNativeOrder.cpp b/src/lib/orderman/orders/GLBXNativeOrder.cpp index 23029318e..742e4ae96 100644 --- a/src/lib/orderman/orders/GLBXNativeOrder.cpp +++ b/src/lib/orderman/orders/GLBXNativeOrder.cpp @@ -2,6 +2,7 @@ #include "lib/api/services/OrderService.pb.h" #include "lib/config/config.h" +#include "lib/config/protos/orderman_cfg.pb.h" #include "lib/config/protos/toggles.pb.h" #include "lib/domain_model/Security.h" #include "lib/jetfix/codec/FIXFragment.h" @@ -12,10 +13,12 @@ #include "lib/orderman/orderman_utils/ExecutionReport.h" #include "lib/orderman/orderman_utils/fix_order_codec.h" #include "lib/orderman/orders/PreActivationOrderServices.h" +#include "lib/orderman/orders/glbx/IGLBXOrderEncoder.h" +#include "lib/orderman/orders/glbx/iLink2OrderEncoder.h" +#include "lib/orderman/orders/glbx/iLink3OrderEncoder.h" #include "lib/orderman/securities/ISecurityDB.h" #include "lib/utils/PBUtils.h" #include "lib/utils/bts_chrono.h" -#include "lib/config/protos/orderman_cfg.pb.h" #include "lib/orderman/actors/order_manager/OrderServices.h" @@ -29,44 +32,32 @@ using namespace api::orderman; OrderStatus map_external_status(NativeOrderStatus); -struct NativeOrder::PImpl { +bool use_ilink3(std::string const &for_session) { + auto &all_connections = config::get().connection(); + for (auto const &c : all_connections) + if (for_session == c.name()) + return c.use_ilink3(); + return false; +} + +struct GLBXNativeOrder::PImpl { PImpl() : services(nullptr), session_services(), sec(nullptr), previous_working_position(0), definition(), state(), - price_encoding_precision(7), exchange_order_id() { - exchange_order_id.reserve(100); - } + price_encoding_precision(7), exchange_order_id() {} OrderServices *services; SessionServices *session_services; const api::Security *sec; + std::unique_ptr encoder; + Quantity previous_working_position; OrderDefinition definition; OrderState state; int price_encoding_precision; - std::string exchange_order_id; - - jetfix::FIXFragment update_encoding; - jetfix::FIXFragment::Bookmark update_price_bm; - jetfix::FIXFragment::Bookmark update_quantity_bm; - jetfix::FIXFragment::Bookmark update_max_show_bm; - jetfix::FIXFragment::Bookmark update_stop_px_bm; - jetfix::FIXFragment::Bookmark - update_transact_time_bm; - jetfix::FIXFragment::Bookmark update_corid_bm; - - jetfix::FIXFragment create_encoding; - jetfix::FIXFragment::Bookmark create_price_bm; - jetfix::FIXFragment::Bookmark create_quantity_bm; - jetfix::FIXFragment::Bookmark - create_transact_time_bm; - jetfix::FIXFragment::Bookmark create_corid_bm; - - jetfix::FIXFragment cancel_encoding; - jetfix::FIXFragment::Bookmark - cancel_transact_time_bm; + std::optional exchange_order_id; OrderServices::ExeReportSubID exe_report_sid; OrderServices::CancelRejectSubID cancel_reject_sid; @@ -74,24 +65,17 @@ struct NativeOrder::PImpl { bool buffered_cancel = false; std::optional buffered_update; RoutingRecord routing_record; + bool stop_order_still_has_stop_px = true; }; -jetfix::FIXFragment::Bookmark -update_corid(jetfix::FIXFragment::Bookmark const &bm, - jetfix::FIXFragment &encoding, trace::CorID const &cid) { - std::array buffer; - encode_corid(cid.channel, cid.sn, buffer); - return encoding.overwrite(bm, &buffer[0], corid_sz()); -} +GLBXNativeOrder::GLBXNativeOrder() : me(new PImpl()) {} -NativeOrder::NativeOrder() : me(new PImpl()) {} - -OrderDefinition const &NativeOrder::definition() const { +OrderDefinition const &GLBXNativeOrder::definition() const { return me->definition; } -void NativeOrder::on_init_new(OrderDefinition const &def, - const PreActivationOrderServices &serv) { +void GLBXNativeOrder::on_init_new(OrderDefinition const &def, + const PreActivationOrderServices &serv) { // order was just created. me->definition = def; @@ -152,14 +136,15 @@ void NativeOrder::on_init_new(OrderDefinition const &def, transition(ORDER_STATUS_INACTIVE); auto &native_state = get_native_state(me->state); + fixup_routing_record(&rq.routing_record); me->routing_record = rq.routing_record; *native_state.mutable_routing_record() = rq.routing_record; - init_fix(); + init_encodings(); } -void NativeOrder::on_init_recovered(OrderRecord const &rec, - const PreActivationOrderServices &serv) { +void GLBXNativeOrder::on_init_recovered( + OrderRecord const &rec, const PreActivationOrderServices &serv) { // order was recovered from our orders database or from an execution // report @@ -191,22 +176,26 @@ void NativeOrder::on_init_recovered(OrderRecord const &rec, } auto rq = serv.order_router.get_routing_record( - UserID(def.user_id()), AccountID(def.account_id()), *me->sec); + UserID(def.user_id()), AccountID(def.account_id()), *me->sec); if (!rq.has_route) { auto msg = fmt::format("Could not route order: {}", rq.error_msg); - LOG(OrderMan, Error, "Unable to route order {} recovered from disk. Message: {}", + LOG(OrderMan, Error, + "Unable to route order {} recovered from disk. Message: {}", rec.key(), msg); transition_to_error(NativeOrderState::SUB_ERROR_UNKNOWN_FIX_SESSION, "Could not route order"); return; } // if we made it this far we are good. - me->routing_record = rq.routing_record; + fixup_routing_record(&rq.routing_record); + me->routing_record = rq.routing_record; *native_state.mutable_routing_record() = rq.routing_record; - - if (me->state.status() != ORDER_STATUS_PENDING_WORKING) - me->exchange_order_id = native_state.exchange_order_id(); - init_fix(); + + init_encodings(); + if (me->state.status() != ORDER_STATUS_PENDING_WORKING) { + me->exchange_order_id = get_exchange_order_id(native_state); + me->encoder->update_exchange_order_id(me->exchange_order_id.value()); + } return; } @@ -226,8 +215,8 @@ void NativeOrder::on_init_recovered(OrderRecord const &rec, } api::orderman::OrderDefinition -NativeOrder::on_init_from_exe_report(ExecutionReport const &er, - const PreActivationOrderServices &os) { +GLBXNativeOrder::on_init_from_exe_report(ExecutionReport const &er, + const PreActivationOrderServices &os) { auto k = er.order_key; OrderRecord orecord; @@ -244,15 +233,24 @@ NativeOrder::on_init_from_exe_report(ExecutionReport const &er, to_trim_str(er.account_name), sec); if (rev_rec.ok) { + LOG(OrderMan, Error, + "Successfully recovered order {} from execution report, " + "using operator id: {}" + " and account: {} on connection: {}. BTS user: {} BTS account: {} ", + k.value(), to_trim_str(er.operator_id), to_trim_str(er.account_name), + er.cfg->name(),rev_rec.user, rev_rec.account); def.set_user(rev_rec.user); def.set_user_id(rev_rec.user_id.value()); def.set_account(rev_rec.account); def.set_account_id(rev_rec.account_id.value()); } else { LOG(OrderMan, Error, - "Could not recover account and user information from order {}" - ". The following information is available: {}. ", - k.value(), rev_rec.error_msg); + "Could not recover BTS account and user information for order {} " + "using operator id: {}" + " and account: {} on connection: {}. The order router returned the " + "following: ", + k.value(), to_trim_str(er.operator_id), to_trim_str(er.account_name), + er.cfg->name(), rev_rec.error_msg); def.set_user(""); def.set_user_id(0); def.set_account(""); @@ -310,11 +308,11 @@ NativeOrder::on_init_from_exe_report(ExecutionReport const &er, } auto &native_state = get_native_state(state); - native_state.set_exchange_order_id(to_trim_str(er.exchange_order_id)); + set_exchange_order_id(er.exchange_order_id, &native_state); native_state.set_last_msg_seq_num(er.msg_seq_num); native_state.set_native_type(er.order_type); native_state.set_stop_px(er.stop_price.value()); - + auto &rr = *native_state.mutable_routing_record(); rr.set_session(er.cfg->name()); rr.set_account(to_trim_str(er.account_name)); @@ -323,14 +321,15 @@ NativeOrder::on_init_from_exe_report(ExecutionReport const &er, rr.set_customer_or_firm(CustomerOrFirm(er.cfg->customer_or_firm())); rr.set_location(er.cfg->sender_locationid()); rr.set_cust_order_handling_inst(er.cust_order_handling_inst); + fixup_routing_record(&rr); on_init_recovered(orecord, os); return orecord.def(); } -NativeOrder::~NativeOrder() {} +GLBXNativeOrder::~GLBXNativeOrder() {} -void NativeOrder::warm_up_activate(OrderServicesData &data, - OrderServices &services) { +void GLBXNativeOrder::warm_up_activate(OrderServicesData &data, + OrderServices &services) { bts_assert(!me->services); me->services = &services; @@ -355,9 +354,9 @@ void NativeOrder::warm_up_activate(OrderServicesData &data, } OrderOpResult -NativeOrder::_on_activate(log::Level reject_level, log::Level transition_level, - Price p, Quantity q, - bts::orderman::OrderServices &services) { +GLBXNativeOrder::_on_activate(log::Level reject_level, + log::Level transition_level, Price p, Quantity q, + bts::orderman::OrderServices &order_services) { me->state.set_price(p.value()); me->state.set_quantity(q.value()); me->state.set_filled_quantity(0); @@ -436,56 +435,29 @@ NativeOrder::_on_activate(log::Level reject_level, log::Level transition_level, *me->session_services, [this](auto const &gw) { this->on_gateway_status(gw); }); - // send out order - auto &encoding = me->create_encoding; - - switch (me->definition.custom_def().custom_case()) { - case CustomOrderDefinition::kLimit: - case CustomOrderDefinition::kStopLimit: - case CustomOrderDefinition::kGlbxIceberg: - me->create_price_bm = encoding.overwrite( - me->create_price_bm, - securities::encode_exchange_price(*me->sec, p).value(), - me->price_encoding_precision, price_sz()); - break; - case CustomOrderDefinition::kStop: - case CustomOrderDefinition::kMarket: - break; - default: - bts_assert(false); - break; - } - - me->create_quantity_bm = - encoding.overwrite(me->create_quantity_bm, q.value(), quantity_sz()); - auto const &ts = services.get_time_str(); - me->create_transact_time_bm = encoding.overwrite( - me->create_transact_time_bm, &ts.value()[0], ts.value().size()); - - me->create_corid_bm = - update_corid(me->create_corid_bm,encoding, services.corid()); + me->encoder->update_create_order_encoding(p, me->price_encoding_precision, q, + order_services); return OrderOpResult{}; } -OrderOpResult NativeOrder::on_activate(Price p, Quantity q, - bts::orderman::OrderServices &services) { +OrderOpResult +GLBXNativeOrder::on_activate(Price p, Quantity q, + bts::orderman::OrderServices &services) { bts_assert(!me->services); me->services = &services; auto result = OrderOpResult{}; switch (me->state.status()) { case ORDER_STATUS_INACTIVE: { + // this is a brand new order + auto scoped_log = services.log_scope("NativeOrder::on_activate", key().value()); - // this is a brand new order result = _on_activate(Warn, Info, p, q, services); if (result.ok()) { - me->services->queue_fix(*me->session_services, - jetfix::MessageTypes::NewOrderSingle, - me->create_encoding); - + me->encoder->send_create(*me->services, *me->session_services); me->services->governor(*me->session_services).record_sent(); me->state.set_status(ORDER_STATUS_PENDING_WORKING); @@ -571,14 +543,14 @@ OrderOpResult NativeOrder::on_activate(Price p, Quantity q, return result; } -OrderOpResult NativeOrder::on_update(Price p, Quantity q) { +OrderOpResult GLBXNativeOrder::on_update(Price p, Quantity q) { api::orderman::Update update; update.set_price(p.value()); update.set_quantity(q.value()); return on_update(update); } -OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { +OrderOpResult GLBXNativeOrder::on_update(api::orderman::Update const &update) { auto p = Price(update.price()); auto q = Quantity(update.quantity()); @@ -628,8 +600,6 @@ OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { break; } - auto &encoding = me->update_encoding; - if (update.has_custom()) { bts_assert(update.custom().custom_case() == me->definition.custom_def().custom_case()); @@ -643,10 +613,8 @@ OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { ->mutable_stop() ->set_stop_price(stop_px.value()); me->services->report_definition(me->definition); - me->update_stop_px_bm = encoding.overwrite( - me->update_stop_px_bm, - securities::encode_exchange_price(*me->sec, stop_px).value(), - me->price_encoding_precision, price_sz()); + me->encoder->update_cancel_replace_stop_px( + stop_px, me->price_encoding_precision); } } else if (update.custom().custom_case() == CustomOrderDefinition::CustomOrderDefinition::kStopLimit) { @@ -657,10 +625,9 @@ OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { ->mutable_stop_limit() ->set_stop_price(stop_px.value()); me->services->report_definition(me->definition); - me->update_stop_px_bm = encoding.overwrite( - me->update_stop_px_bm, - securities::encode_exchange_price(*me->sec, stop_px).value(), - me->price_encoding_precision, price_sz()); + + me->encoder->update_cancel_replace_stop_px( + stop_px, me->price_encoding_precision); } } else if (update.custom().custom_case() == CustomOrderDefinition::kGlbxIceberg) { @@ -675,32 +642,20 @@ OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { ignore_or_cancel(msg, ORDER_ERROR_INVALID_PARAMETER, &result); break; } - me->update_max_show_bm = encoding.overwrite( - me->update_max_show_bm, ib.max_show_quantity(), quantity_sz()); + me->encoder->update_cancel_replace_max_show( + Quantity(ib.max_show_quantity())); } } // All good - if (is_stop_limit_order() || !is_stop_order() || stop_order_has_been_triggered()) { + if (is_stop_limit_order() || !is_stop_order() || + stop_order_has_been_triggered()) { // Stop orders become limit orders when triggered - me->update_price_bm = encoding.overwrite( - me->update_price_bm, - securities::encode_exchange_price(*me->sec, p).value(), - me->price_encoding_precision, price_sz()); + me->encoder->update_cancel_replace_encoding( + p, me->price_encoding_precision, *me->services); } - me->update_quantity_bm = - encoding.overwrite(me->update_quantity_bm, q.value(), quantity_sz()); - - auto const &ts = me->services->get_time_str(); - me->update_transact_time_bm = encoding.overwrite( - me->update_transact_time_bm, &ts.value()[0], ts.value().size()); - - me->update_corid_bm = - update_corid(me->update_corid_bm,encoding, me->services->corid()); - - me->services->queue_fix(*me->session_services, - jetfix::MessageTypes::CancelReplace, - me->update_encoding); + me->encoder->update_cancel_replace_encoding(q, *me->services); + me->encoder->send_cancel_replace(*me->services, *me->session_services); me->services->governor(*me->session_services).record_sent(); update_working_position(); @@ -734,9 +689,9 @@ OrderOpResult NativeOrder::on_update(api::orderman::Update const &update) { return result; } -OrderOpResult NativeOrder::on_detach() { return OrderOpResult{}; } +OrderOpResult GLBXNativeOrder::on_detach() { return OrderOpResult{}; } -void NativeOrder::on_attached( +void GLBXNativeOrder::on_attached( api::orderman::OrderDefinition const &new_parent) { switch (me->state.status()) { @@ -761,7 +716,9 @@ void NativeOrder::on_attached( auto &native_state = get_native_state(me->state); *native_state.mutable_routing_record() = rq.routing_record; - init_fix(); + init_encodings(); + if (has_exchange_order_id()) + me->encoder->update_exchange_order_id(me->exchange_order_id.value()); // Update user, account and manual order indicator based on new parent me->definition.set_manual_order_indicator( @@ -789,7 +746,7 @@ void NativeOrder::on_attached( } } -OrderOpResult NativeOrder::on_cancel() { +OrderOpResult GLBXNativeOrder::on_cancel() { auto scoped_log = me->services->log_scope("NativeOrder::on_cancel", key().value()); auto result = OrderOpResult{}; @@ -797,15 +754,8 @@ OrderOpResult NativeOrder::on_cancel() { switch (me->state.status()) { case ORDER_STATUS_WORKING: { - auto &encoding = me->cancel_encoding; - auto const &ts = me->services->get_time_str(); - me->cancel_transact_time_bm = encoding.overwrite( - me->cancel_transact_time_bm, &ts.value()[0], ts.value().size()); - - me->services->queue_fix(*me->session_services, - jetfix::MessageTypes::Cancel, - me->cancel_encoding); - + me->encoder->update_cancel_encoding(*me->services); + me->encoder->send_cancel(*me->services, *me->session_services); break; } @@ -847,29 +797,43 @@ OrderOpResult NativeOrder::on_cancel() { return result; } -bool NativeOrder::is_old_exe_report( +bool GLBXNativeOrder::is_old_exe_report( api::orderman::NativeOrderState &native_state, const NewExecutionReportEvent &er) const { + + // Do we have a last transact_time ? if (native_state.last_transact_time().size() != - sizeof(mercury::TimeStampStr)) + sizeof(orderman::ExchangeTimeStampStr) && + native_state.last_transact_time_unix_ns() == 0) return false; - if (std::lexicographical_compare(native_state.last_transact_time().begin(), - native_state.last_transact_time().end(), - er.data->transact_time.value().begin(), - er.data->transact_time.value().end())) - return false; + if (native_state.last_transact_time_unix_ns() == 0) { + // No Unix TS transact time, assume we have a text one + auto &ts = + std::get(er.data->transact_time); + if (std::lexicographical_compare( + native_state.last_transact_time().begin(), + native_state.last_transact_time().end(), ts.value().begin(), + ts.value().end())) + return false; - if (std::equal(native_state.last_transact_time().begin(), - native_state.last_transact_time().end(), - er.data->transact_time.value().begin(), - er.data->transact_time.value().end())) - return native_state.last_msg_seq_num() >= er.data->msg_seq_num; - - return true; + if (std::equal(native_state.last_transact_time().begin(), + native_state.last_transact_time().end(), + ts.value().begin(), ts.value().end())) + return native_state.last_msg_seq_num() >= er.data->msg_seq_num; + return true; + } else { + // No text based ts we must have a uint64 one + auto ts = std::get(er.data->transact_time); + if (ts.value() > native_state.last_transact_time_unix_ns()) + return false; + if (ts.value() < native_state.last_transact_time_unix_ns()) + return true; + return er.data->msg_seq_num <= native_state.last_msg_seq_num(); + } } -void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) { +void GLBXNativeOrder::on_exe_report(const NewExecutionReportEvent &er) { auto scoped_log = me->services->log_scope("NativeOrder::on_exe_report", key().value()); @@ -894,12 +858,11 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) { } native_state.set_last_msg_seq_num(er.data->msg_seq_num); - native_state.set_last_transact_time(to_str(er.data->transact_time)); - + set_last_transact_time(er.data->transact_time, &native_state); auto external_status = map_external_status(er.data->order_status); // filled quantity is reset back to 0 when the order is canceled - if (external_status != ORDER_STATUS_CANCELED) { + if (external_status != ORDER_STATUS_CANCELED ) { if (er.data->exec_type == api::orderman::EXEC_TYPE_PARTIAL_FILL || er.data->exec_type == api::orderman::EXEC_TYPE_FILL) { @@ -914,9 +877,9 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) { (previous_sz + fill_sz); state.set_avg_price(new_avg); + state.set_filled_quantity(er.data->filled_quantity.value()); + state.set_last_price(er.data->last_price.value()); } - state.set_filled_quantity(er.data->filled_quantity.value()); - state.set_last_price(er.data->last_price.value()); } state.set_last_msg(er.data->msg); @@ -924,20 +887,23 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) { native_state.set_native_status(er.data->order_status); native_state.set_native_type(er.data->order_type); native_state.set_stop_px(er.data->stop_price.value()); - bool got_first_exchange_order_id = !has_exchange_order_id(); - - if (got_first_exchange_order_id) { - me->exchange_order_id = to_trim_str(er.data->exchange_order_id); - native_state.set_exchange_order_id(me->exchange_order_id); - add_exchange_order_id_to_fix(); - } // The FIX message we send for updates has to change once a stop // order is triggered. Post triggering we no longer can update the // stop px. Instead the stop order turns into a regular limit // order, which means we can now update the actual price. - if (is_stop_order() && stop_order_has_been_triggered() && fix_has_stop_px()) - init_fix(); + if (is_stop_order() && stop_order_has_been_triggered() && + me->stop_order_still_has_stop_px) { + me->stop_order_still_has_stop_px = false; + init_encodings(); + } + + bool got_first_exchange_order_id = !has_exchange_order_id(); + if (got_first_exchange_order_id) { + me->exchange_order_id = er.data->exchange_order_id; + set_exchange_order_id(me->exchange_order_id.value(), &native_state); + me->encoder->update_exchange_order_id(me->exchange_order_id.value()); + } if (!terminal_state(me->state.status())) { state.set_price(er.data->price.value()); @@ -1003,7 +969,7 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) { } } -void NativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr) { +void GLBXNativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr) { LOG(OrderMan, Warn, "Cancel reject received for order {}", key().value()); switch (me->state.status()) { @@ -1013,16 +979,24 @@ void NativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr) { break; case ORDER_STATUS_DISCONNECTED: + case ORDER_STATUS_ERROR: { + auto &state = me->state; + state.set_last_msg(cr.reject_msg()); + report_state(); + break; + } + case ORDER_STATUS_PENDING_WORKING: case ORDER_STATUS_WORKING: { auto &state = me->state; - state.set_last_msg(cr.reject_msg); + state.set_last_msg(cr.reject_msg()); + if (cr.reason() == CancelRejectReason::UnknownOrder) + transition(ORDER_STATUS_CANCELED); report_state(); break; } case ORDER_STATUS_INACTIVE: - case ORDER_STATUS_ERROR: case ORDER_STATUS_REJECTED_BY_SPARK: case OrderStatus_INT_MIN_SENTINEL_DO_NOT_USE_: case OrderStatus_INT_MAX_SENTINEL_DO_NOT_USE_: @@ -1031,7 +1005,7 @@ void NativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr) { } } -void NativeOrder::on_gateway_status(const GatewayStatusChangeEvent &ev) { +void GLBXNativeOrder::on_gateway_status(const GatewayStatusChangeEvent &ev) { if (ev.is_connected) { switch (me->state.status()) { case ORDER_STATUS_COMPLETED: @@ -1091,7 +1065,7 @@ void NativeOrder::on_gateway_status(const GatewayStatusChangeEvent &ev) { report_state(); } -void NativeOrder::update_working_position() { +void GLBXNativeOrder::update_working_position() { if (me->sec) { auto current_position = working_position(); auto previous_position = me->previous_working_position; @@ -1114,253 +1088,31 @@ void NativeOrder::update_working_position() { key().value(), me->definition.security_key()); } -void NativeOrder::report_state() { +void GLBXNativeOrder::report_state() { update_working_position(); me->services->report_state(me->state); } -std::string NativeOrder::get_cust_order_handling_inst(api::orderman::RoutingRecord const&rr) { - if (rr.cust_order_handling_inst().size()) - return rr.cust_order_handling_inst(); - else - return config::get().fallback_cust_order_handling_inst(); -} - -void NativeOrder::init_fix() { - bts_assert(me->sec); - - using namespace jetfix; - me->create_encoding = FIXFragment{}; - me->update_encoding = FIXFragment{}; - me->cancel_encoding = FIXFragment{}; - - auto const &def = me->definition; - auto const &sec = *me->sec; - auto const &rr = me->routing_record; - - std::string clordid(clordid_sz(), ' '); - encode_clorid(key(), SecurityKey(sec.id()), &clordid); - - // initialize create FIX - auto &create_encoding = me->create_encoding; - create_encoding.add(rr.operator_id()); - create_encoding.add(rr.location()); - create_encoding.add(rr.account()); - create_encoding.add(def.side()); - create_encoding.add(def.time_in_force()); - create_encoding.add(def.manual_order_indicator()); - create_encoding.add(rr.customer_or_firm()); - create_encoding.add(rr.cti_code()); - create_encoding.add(sec.glbx().security_desc()); - create_encoding.add(clordid); - create_encoding.add (get_cust_order_handling_inst(rr)); - - if (rr.smp_id().size()) { - create_encoding.add(rr.smp_id()); - if (rr.smp_instruction() != SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED) - create_encoding.add( - rr.smp_instruction()); - } - - me->create_transact_time_bm = create_encoding.add( - datetime::FIX_timestamp(datetime::now())); - me->create_quantity_bm = - create_encoding.add(0, quantity_sz()); - me->create_corid_bm = - create_encoding.add(std::string(corid_sz(), ' ')); - - // initialize update FIX - auto &update_encoding = me->update_encoding; - update_encoding.add(rr.operator_id()); - update_encoding.add(rr.location()); - update_encoding.add(rr.account()); - update_encoding.add(def.side()); - update_encoding.add(def.time_in_force()); - update_encoding.add(def.manual_order_indicator()); - update_encoding.add(rr.cti_code()); - update_encoding.add(rr.customer_or_firm()); - update_encoding.add(sec.glbx().security_desc()); - update_encoding.add(clordid); - update_encoding.add(clordid); - update_encoding.add(clordid); - update_encoding.add(true); - update_encoding.add (get_cust_order_handling_inst(rr)); - // Self Match Protection - if (rr.smp_id().size()) { - update_encoding.add(rr.smp_id()); - if (rr.smp_instruction() != SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED) - update_encoding.add( - rr.smp_instruction()); - } - me->update_transact_time_bm = update_encoding.add( - datetime::FIX_timestamp(datetime::now())); - me->update_quantity_bm = - update_encoding.add(0, quantity_sz()); - me->update_corid_bm = - update_encoding.add(std::string(corid_sz(), ' ')); - - // initialize cancel FIX - auto &cancel_encoding = me->cancel_encoding; - cancel_encoding.add(rr.operator_id()); - cancel_encoding.add(rr.location()); - cancel_encoding.add(rr.account()); - cancel_encoding.add(def.side()); - cancel_encoding.add(def.time_in_force()); - cancel_encoding.add(def.manual_order_indicator()); - cancel_encoding.add(sec.glbx().security_desc()); - cancel_encoding.add(clordid); - cancel_encoding.add(clordid); - cancel_encoding.add(clordid); - me->cancel_transact_time_bm = cancel_encoding.add( - datetime::FIX_timestamp(datetime::now())); - - // special tags - switch (def.custom_def().custom_case()) { - case CustomOrderDefinition::kMarket: - // type - create_encoding.add(NATIVE_ORDER_TYPE_MARKET); - update_encoding.add(NATIVE_ORDER_TYPE_MARKET); - cancel_encoding.add(NATIVE_ORDER_TYPE_MARKET); - break; - - case CustomOrderDefinition::kLimit: - // type - create_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - - // price - me->create_price_bm = create_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_price_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - break; - - case CustomOrderDefinition::kStop: { - // type - create_encoding.add(NATIVE_ORDER_TYPE_STOP); - - // stop px - auto stop_px = def.custom_def().stop().stop_price(); - auto encoded_stop_px = - securities::encode_exchange_price(*me->sec, Price(stop_px)).value(); - create_encoding.add(encoded_stop_px, - me->price_encoding_precision, -1); - - // Stop orders go through two stages. Before the stop price is - // triggered they are stop orders and have no price field, only - // stop px. After being triggered they become regular limit - // orders and have only price, not stop px fields. - if (stop_order_has_been_triggered()) { - update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - me->update_price_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_stop_px_bm = {}; - } else { - update_encoding.add(NATIVE_ORDER_TYPE_STOP); - cancel_encoding.add(NATIVE_ORDER_TYPE_STOP); - me->update_price_bm = {}; - me->update_stop_px_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - } - - break; - } - - case CustomOrderDefinition::kStopLimit: { - // type - create_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); - - // stop px - auto stop_px = def.custom_def().stop_limit().stop_price(); - auto encoded_stop_px = - securities::encode_exchange_price(*me->sec, Price(stop_px)).value(); - create_encoding.add(encoded_stop_px, - me->price_encoding_precision, -1); - - // Like stop orders, stop limits go through two stages. Before - // the stop price is triggered they are stop limit orders and - // have both a price and a stop px price field. After being - // triggered they become regular limit orders and have only - // price, not stop px fields. - if (stop_order_has_been_triggered()) { - update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - me->update_price_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_stop_px_bm = {}; - } else { - update_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); - cancel_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); - me->create_price_bm = create_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_price_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_stop_px_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - } - - break; - } - case CustomOrderDefinition::kGlbxIceberg: { - - // type, still a limit order but we use a show quantity - create_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); - - // price - me->create_price_bm = create_encoding.add( - 0, me->price_encoding_precision, price_sz()); - me->update_price_bm = update_encoding.add( - 0, me->price_encoding_precision, price_sz()); - - // max show qty - auto max_show_qty = def.custom_def().glbx_iceberg().max_show_quantity(); - create_encoding.add(max_show_qty); - me->update_max_show_bm = - update_encoding.add(max_show_qty, max_show_sz()); - break; - } - - default: - bts_assert(false); - break; - } - if (has_exchange_order_id()) - add_exchange_order_id_to_fix(); -} - -bool NativeOrder::is_stop_order() { +bool GLBXNativeOrder::is_stop_order() { auto const &def = me->definition; return (def.custom_def().custom_case() == CustomOrderDefinition::kStop || def.custom_def().custom_case() == CustomOrderDefinition::kStopLimit); } -bool NativeOrder::is_stop_limit_order() { +bool GLBXNativeOrder::is_stop_limit_order() { auto const &def = me->definition; return def.custom_def().custom_case() == CustomOrderDefinition::kStopLimit; } -bool NativeOrder::stop_order_has_been_triggered() { - bts_assert(is_stop_order()); +bool GLBXNativeOrder::stop_order_has_been_triggered() { + if (!is_stop_order()) + return false; + auto const &native_state = get_native_state(me->state); return has_exchange_order_id() && native_state.native_type() == NATIVE_ORDER_TYPE_LIMIT; } -bool NativeOrder::fix_has_stop_px() { - bts_assert(is_stop_order()); - return me->update_stop_px_bm.valid(); -} - -void NativeOrder::add_exchange_order_id_to_fix() { - bts_assert(has_exchange_order_id()); - me->update_encoding.add(me->exchange_order_id); - me->cancel_encoding.add(me->exchange_order_id); -} - OrderStatus map_external_status(NativeOrderStatus status) { switch (status) { case NATIVE_ORDER_STATUS_NEW: @@ -1398,18 +1150,18 @@ OrderStatus map_external_status(NativeOrderStatus status) { return ORDER_STATUS_ERROR; } -bool NativeOrder::has_exchange_order_id() { - return me->exchange_order_id.size(); +bool GLBXNativeOrder::has_exchange_order_id() { + return me->exchange_order_id.has_value(); } -void NativeOrder::transition(api::orderman::OrderStatus new_status, - std::string const &msg) { +void GLBXNativeOrder::transition(api::orderman::OrderStatus new_status, + std::string const &msg) { transition(Info, new_status, msg); } -void NativeOrder::transition(log::Level level, - api::orderman::OrderStatus new_status, - std::string const &msg) { +void GLBXNativeOrder::transition(log::Level level, + api::orderman::OrderStatus new_status, + std::string const &msg) { auto const &from = OrderStatus_Name(me->state.status()); auto const &to = OrderStatus_Name(new_status); if (from != to) @@ -1419,7 +1171,7 @@ void NativeOrder::transition(log::Level level, me->state.set_last_msg(msg); } -void NativeOrder::transition(api::orderman::OrderStatus new_status) { +void GLBXNativeOrder::transition(api::orderman::OrderStatus new_status) { auto const &from = OrderStatus_Name(me->state.status()); auto const &to = OrderStatus_Name(new_status); if (from != to) @@ -1432,7 +1184,7 @@ void NativeOrder::transition(api::orderman::OrderStatus new_status) { me->state.set_status(new_status); } -void NativeOrder::transition_to_error( +void GLBXNativeOrder::transition_to_error( api::orderman::NativeOrderState::SubError sub_error, std::string const &msg) { me->state.mutable_limit()->mutable_native_state()->set_sub_error_code( @@ -1440,7 +1192,7 @@ void NativeOrder::transition_to_error( transition(ORDER_STATUS_ERROR, msg); } -Quantity NativeOrder::working_position() { +Quantity GLBXNativeOrder::working_position() { switch (me->state.status()) { case ORDER_STATUS_WORKING: @@ -1467,7 +1219,7 @@ Quantity NativeOrder::working_position() { return Quantity(0); } -bool NativeOrder::terminal_state(api::orderman::OrderStatus status) const { +bool GLBXNativeOrder::terminal_state(api::orderman::OrderStatus status) const { switch (status) { case ORDER_STATUS_COMPLETED: @@ -1493,7 +1245,7 @@ bool NativeOrder::terminal_state(api::orderman::OrderStatus status) const { } api::orderman::NativeOrderState & -NativeOrder::get_native_state(api::orderman::OrderState &st) { +GLBXNativeOrder::get_native_state(api::orderman::OrderState &st) { switch (st.custom_case()) { case OrderState::kMarket: return *st.mutable_market()->mutable_native_state(); @@ -1514,9 +1266,9 @@ NativeOrder::get_native_state(api::orderman::OrderState &st) { return *st.mutable_stop_limit()->mutable_native_state(); } -void NativeOrder::ignore_or_cancel(std::string const &msg, - api::orderman::OrderError error, - OrderOpResult *out) { +void GLBXNativeOrder::ignore_or_cancel(std::string const &msg, + api::orderman::OrderError error, + OrderOpResult *out) { if (parent_key() == null_order_key()) transition(me->state.status(), msg); else { @@ -1526,5 +1278,32 @@ void NativeOrder::ignore_or_cancel(std::string const &msg, *out = {error, msg}; } +void GLBXNativeOrder::init_encodings() { + auto rr = get_native_state(me->state).routing_record(); + if (use_ilink3(rr.session())) + me->encoder = std::make_unique(); + else + me->encoder = std::make_unique(); + me->encoder->init(key(), rr, *me->sec, definition(), + me->price_encoding_precision, + stop_order_has_been_triggered()); +} + +// We need this because at the moment (Jul 2020) the sender_compid and +// the CustOrderHandlingInst are not being retrieved from the admin +// database for CME. Its quicker to patch the routing record here than +// it is to add new fields to the web UI. +void GLBXNativeOrder::fixup_routing_record(api::orderman::RoutingRecord *rr) { + auto &all_connections = config::get().connection(); + for (auto const &c : all_connections) + if (c.name() == rr->session()) { + rr->set_sender_compid(c.sender_compid()); + break; + } + if (rr->cust_order_handling_inst().empty()) + rr->set_cust_order_handing_inst(config::get() + .fallback_cust_order_handling_inst()); +} + } // namespace orderman } // namespace bts diff --git a/src/lib/orderman/orders/GLBXNativeOrder.h b/src/lib/orderman/orders/GLBXNativeOrder.h index 8cada714e..b6d6ad046 100644 --- a/src/lib/orderman/orders/GLBXNativeOrder.h +++ b/src/lib/orderman/orders/GLBXNativeOrder.h @@ -1,84 +1,84 @@ -#pragma once - -#include "lib/api/services/OrderService.pb.h" -#include "lib/orderman/orders/NativeOrderBase.h" -#include "lib/tracing/PerfLog.h" -#include - -namespace bts { -namespace orderman { -class NewExecutionReportEvent; -class CancelRejectEvent; -class GatewayStatusChangeEvent; -class ExecutionReport; - -class NativeOrder : public NativeOrderBase { - public: - NativeOrder(); - ~NativeOrder() override; - - api::orderman::OrderDefinition const &definition() const override; - void on_init_new(api::orderman::OrderDefinition const &, - const PreActivationOrderServices &) override; - void on_init_recovered(api::orderman::OrderRecord const &, - const PreActivationOrderServices &) override; - - OrderOpResult on_activate(Price, Quantity, OrderServices &) override; - OrderOpResult on_update(Price, Quantity) override; - OrderOpResult on_update(api::orderman::Update const &) override; - OrderOpResult on_detach() override; - OrderOpResult on_cancel() override; - void on_attached(api::orderman::OrderDefinition const &new_parent) override; - - api::orderman::OrderDefinition - on_init_from_exe_report(ExecutionReport const &, - const PreActivationOrderServices &) override; - - protected: - void warm_up_activate(OrderServicesData &, OrderServices &) override; - - private: - struct PImpl; - std::unique_ptr me; - void on_exe_report(const NewExecutionReportEvent &); - void on_cancel_reject(const CancelRejectEvent &); - void on_gateway_status(const GatewayStatusChangeEvent &); - void report_state(); - OrderOpResult _on_activate(log::Level reject_level, - log::Level transition_level, Price p, Quantity q, - bts::orderman::OrderServices &services); - void init_fix(); - void add_exchange_order_id_to_fix(); - - void transition(log::Level, - api::orderman::OrderStatus new_state, - std::string const &msg); - void transition(api::orderman::OrderStatus new_state, - std::string const &msg); - void transition(api::orderman::OrderStatus new_state); - void transition_to_error(api::orderman::NativeOrderState::SubError sub_error, - std::string const &msg); - - void update_working_position(); - bool has_exchange_order_id(); - Quantity working_position(); - bool is_old_exe_report(api::orderman::NativeOrderState &, - const NewExecutionReportEvent &) const; - bool terminal_state(api::orderman::OrderStatus status) const; - api::orderman::NativeOrderState & - get_native_state(api::orderman::OrderState &); - void ignore_or_cancel(std::string const &, - api::orderman::OrderError, - OrderOpResult *out) ; - - std::string get_cust_order_handling_inst(api::orderman::RoutingRecord const&); - bool stop_order_has_been_triggered() ; - bool is_stop_order() ; - bool is_stop_limit_order() ; - bool fix_has_stop_px() ; -}; - -typedef NativeOrder GLBXNativeOrder; - -} // namespace orderman -} // namespace bts +#pragma once + +#include "lib/api/services/OrderService.pb.h" +#include "lib/orderman/orders/NativeOrderBase.h" +#include "lib/tracing/PerfLog.h" +#include + +namespace bts { +namespace orderman { +class NewExecutionReportEvent; +class CancelRejectEvent; +class GatewayStatusChangeEvent; +class ExecutionReport; + +class GLBXNativeOrder : public NativeOrderBase { + public: + GLBXNativeOrder(); + ~GLBXNativeOrder() override; + + api::orderman::OrderDefinition const &definition() const override; + void on_init_new(api::orderman::OrderDefinition const &, + const PreActivationOrderServices &) override; + void on_init_recovered(api::orderman::OrderRecord const &, + const PreActivationOrderServices &) override; + + OrderOpResult on_activate(Price, Quantity, OrderServices &) override; + OrderOpResult on_update(Price, Quantity) override; + OrderOpResult on_update(api::orderman::Update const &) override; + OrderOpResult on_detach() override; + OrderOpResult on_cancel() override; + void on_attached(api::orderman::OrderDefinition const &new_parent) override; + + api::orderman::OrderDefinition + on_init_from_exe_report(ExecutionReport const &, + const PreActivationOrderServices &) override; + + protected: + void warm_up_activate(OrderServicesData &, OrderServices &) override; + + private: + struct PImpl; + std::unique_ptr me; + void init_encodings(); + + void fixup_routing_record(api::orderman::RoutingRecord *rr); + void on_exe_report(const NewExecutionReportEvent &); + void on_cancel_reject(const CancelRejectEvent &); + void on_gateway_status(const GatewayStatusChangeEvent &); + void report_state(); + OrderOpResult _on_activate(log::Level reject_level, + log::Level transition_level, Price p, Quantity q, + bts::orderman::OrderServices &services); + void add_exchange_order_id_to_fix(); + + void transition(log::Level, + api::orderman::OrderStatus new_state, + std::string const &msg); + void transition(api::orderman::OrderStatus new_state, + std::string const &msg); + void transition(api::orderman::OrderStatus new_state); + void transition_to_error(api::orderman::NativeOrderState::SubError sub_error, + std::string const &msg); + + void update_working_position(); + bool has_exchange_order_id(); + Quantity working_position(); + bool is_old_exe_report(api::orderman::NativeOrderState &, + const NewExecutionReportEvent &) const; + bool terminal_state(api::orderman::OrderStatus status) const; + api::orderman::NativeOrderState & + get_native_state(api::orderman::OrderState &); + void ignore_or_cancel(std::string const &, + api::orderman::OrderError, + OrderOpResult *out) ; + + bool stop_order_has_been_triggered() ; + bool is_stop_order() ; + bool is_stop_limit_order() ; +}; + +typedef GLBXNativeOrder GLBXNativeOrder; + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/ICENativeOrder.cpp b/src/lib/orderman/orders/ICENativeOrder.cpp index 004e00404..6cfcf621d 100644 --- a/src/lib/orderman/orders/ICENativeOrder.cpp +++ b/src/lib/orderman/orders/ICENativeOrder.cpp @@ -299,7 +299,10 @@ ICENativeOrder::on_init_from_exe_report(const ExecutionReport& er, const PreActi } auto &native_state = get_native_state(state); - native_state.set_exchange_order_id(to_trim_str(er.exchange_order_id)); + native_state.set_exchange_order_id( + to_trim_str( + std::get( + er.exchange_order_id))); native_state.set_last_msg_seq_num(er.msg_seq_num); native_state.set_native_type(er.order_type); @@ -788,19 +791,20 @@ OrderOpResult ICENativeOrder::on_cancel() bool ICENativeOrder::is_old_exe_report(api::orderman::NativeOrderState &native_state, const NewExecutionReportEvent &er) const { - if (native_state.last_transact_time().size() != sizeof(mercury::TimeStampStr)) + if (native_state.last_transact_time().size() != sizeof(orderman::ExchangeTimeStampStr)) return false; + auto& ts = std::get(er.data->transact_time); if (std::lexicographical_compare(native_state.last_transact_time().begin(), native_state.last_transact_time().end(), - er.data->transact_time.value().begin(), - er.data->transact_time.value().end())) + ts.value().begin(), + ts.value().end())) return false; if (std::equal(native_state.last_transact_time().begin(), native_state.last_transact_time().end(), - er.data->transact_time.value().begin(), - er.data->transact_time.value().end())) + ts.value().begin(), + ts.value().end())) return native_state.last_msg_seq_num() >= er.data->msg_seq_num; return true; @@ -836,7 +840,7 @@ void ICENativeOrder::on_exe_report(const NewExecutionReportEvent &er) } native_state.set_last_msg_seq_num(er.data->msg_seq_num); - native_state.set_last_transact_time(to_str(er.data->transact_time)); + native_state.set_last_transact_time(to_str(std::get(er.data->transact_time))); auto external_status = map_external_status(er.data->order_status); if (external_status != ORDER_STATUS_CANCELED) @@ -860,7 +864,10 @@ void ICENativeOrder::on_exe_report(const NewExecutionReportEvent &er) bool got_first_exchange_order_id = !has_exchange_order_id(); if (got_first_exchange_order_id) { - me->exchange_order_id = to_trim_str(er.data->exchange_order_id); + me->exchange_order_id = + to_trim_str( + std::get( + er.data->exchange_order_id)); native_state.set_exchange_order_id(me->exchange_order_id); add_exchange_order_id_to_fix(); } @@ -962,7 +969,7 @@ void ICENativeOrder::handle_buffered_state(const std::string& condition) void ICENativeOrder::on_cancel_reject(const orderman::CancelRejectEvent &cr) { auto &state = me->state; - state.set_last_msg(cr.reject_msg); + state.set_last_msg(cr.reject_msg()); LOG(OrderMan, Warn, "Cancel reject received for order {}", key().value()); switch (me->state.status()) diff --git a/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.cpp b/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.cpp new file mode 100644 index 000000000..cdeb87ba7 --- /dev/null +++ b/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.cpp @@ -0,0 +1 @@ +#include "IGLBXOrderEncoder.h" diff --git a/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.h b/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.h new file mode 100644 index 000000000..9a33b1082 --- /dev/null +++ b/src/lib/orderman/orders/glbx/IGLBXOrderEncoder.h @@ -0,0 +1,51 @@ +#pragma once + +#include "lib/orderman/orderman_utils/orderman_common.h" +#include + +namespace bts { +namespace api { +namespace orderman { +class RoutingRecord; +} +} // namespace api +namespace orderman { + +class OrderServices; +class SessionServices; + +// Abstraction of the byte encoding of order messages, necessary to +// support iLink2 and iLink3 using the same base order logic. +// GLBXNativeOrder will consume this interface. + +class IGLBXOrderEncoder { + public: + virtual ~IGLBXOrderEncoder() {} + virtual void init(OrderKey key, api::orderman::RoutingRecord const &, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int price_encoding_precision, + bool stop_order_has_been_triggered) = 0; + + virtual void update_exchange_order_id(ExchangeOrderIDVar const&) = 0; + + virtual void update_create_order_encoding(Price p, int price_precision, + Quantity q, OrderServices &) = 0; + + virtual void update_cancel_replace_stop_px(Price stop_px, + int price_precision) = 0; + virtual void update_cancel_replace_max_show(Quantity max_show) = 0; + virtual void update_cancel_replace_encoding(Price p, int price_precision, + Quantity q, OrderServices &) = 0; + virtual void update_cancel_replace_encoding(Quantity q, OrderServices &) = 0; + virtual void update_cancel_replace_encoding(Price p, + int price_precision, + OrderServices &) = 0; + virtual void update_cancel_encoding(OrderServices&) = 0; + virtual void send_create(OrderServices&,SessionServices&) = 0; + virtual void send_cancel_replace(OrderServices&,SessionServices&) = 0; + virtual void send_cancel(OrderServices&,SessionServices&) = 0; +}; + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/glbx/iLink2OrderEncoder.cpp b/src/lib/orderman/orders/glbx/iLink2OrderEncoder.cpp new file mode 100644 index 000000000..1bc2df373 --- /dev/null +++ b/src/lib/orderman/orders/glbx/iLink2OrderEncoder.cpp @@ -0,0 +1,396 @@ +#include "iLink2OrderEncoder.h" +#include "lib/api/services/OrderService.pb.h" +#include "lib/config/config.h" +#include "lib/config/protos/orderman_cfg.pb.h" +#include "lib/domain_model/Security.h" +#include "lib/jetfix/codec/FIXFragment.h" +#include "lib/jetfix/codec/FieldDefinitions.h" +#include "lib/orderman/actors/order_manager/OrderServices.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" + +namespace bts { +namespace orderman { + +using namespace api::orderman; + +struct iLink2OrderEncoder::PImpl { + PImpl() {} + + CustomOrderDefinition::CustomCase order_type; + api::Security const *security; + + jetfix::FIXFragment update_encoding; + jetfix::FIXFragment::Bookmark update_price_bm; + jetfix::FIXFragment::Bookmark update_quantity_bm; + jetfix::FIXFragment::Bookmark update_max_show_bm; + jetfix::FIXFragment::Bookmark update_stop_px_bm; + jetfix::FIXFragment::Bookmark + update_transact_time_bm; + jetfix::FIXFragment::Bookmark update_corid_bm; + + jetfix::FIXFragment create_encoding; + jetfix::FIXFragment::Bookmark create_price_bm; + jetfix::FIXFragment::Bookmark create_quantity_bm; + jetfix::FIXFragment::Bookmark + create_transact_time_bm; + jetfix::FIXFragment::Bookmark create_corid_bm; + + jetfix::FIXFragment cancel_encoding; + jetfix::FIXFragment::Bookmark + cancel_transact_time_bm; +}; + +jetfix::FIXFragment::Bookmark static update_corid( + jetfix::FIXFragment::Bookmark const &bm, + jetfix::FIXFragment &encoding, trace::CorID const &cid) { + std::array buffer; + encode_corid(cid.channel, cid.sn, buffer); + return encoding.overwrite(bm, &buffer[0], corid_sz()); +} + +static std::string +get_cust_order_handling_inst(api::orderman::RoutingRecord const &rr) { + if (rr.cust_order_handling_inst().size()) + return rr.cust_order_handling_inst(); + else + return config::get() + .fallback_cust_order_handling_inst(); +} + +iLink2OrderEncoder::iLink2OrderEncoder() : me(new PImpl()) {} +iLink2OrderEncoder::~iLink2OrderEncoder() {} + +void iLink2OrderEncoder::init(OrderKey key, + api::orderman::RoutingRecord const &rr, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int price_encoding_precision, + bool stop_order_has_been_triggered) { + + me->security = &security; + me->order_type = def.custom_def().custom_case(); + + using namespace jetfix; + me->create_encoding = FIXFragment{}; + me->update_encoding = FIXFragment{}; + me->cancel_encoding = FIXFragment{}; + + auto const &sec = *me->security; + + std::string clordid(clordid_sz(), ' '); + encode_clorid(key, SecurityKey(sec.id()), &clordid); + + // initialize create FIX + auto &create_encoding = me->create_encoding; + create_encoding.add(rr.operator_id()); + create_encoding.add(rr.location()); + create_encoding.add(rr.account()); + create_encoding.add(def.side()); + create_encoding.add(def.time_in_force()); + create_encoding.add(def.manual_order_indicator()); + create_encoding.add(rr.customer_or_firm()); + create_encoding.add(rr.cti_code()); + create_encoding.add(sec.glbx().security_desc()); + create_encoding.add(clordid); + create_encoding.add( + get_cust_order_handling_inst(rr)); + + if (rr.smp_id().size()) { + create_encoding.add(rr.smp_id()); + if (rr.smp_instruction() != SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED) + create_encoding.add( + rr.smp_instruction()); + } + me->create_transact_time_bm = create_encoding.add( + datetime::FIX_timestamp(datetime::now())); + me->create_quantity_bm = + create_encoding.add(0, quantity_sz()); + me->create_corid_bm = + create_encoding.add(std::string(corid_sz(), ' ')); + + // initialize update FIX + auto &update_encoding = me->update_encoding; + update_encoding.add(rr.operator_id()); + update_encoding.add(rr.location()); + update_encoding.add(rr.account()); + update_encoding.add(def.side()); + update_encoding.add(def.time_in_force()); + update_encoding.add(def.manual_order_indicator()); + update_encoding.add(rr.cti_code()); + update_encoding.add(rr.customer_or_firm()); + update_encoding.add(sec.glbx().security_desc()); + update_encoding.add(clordid); + update_encoding.add( + get_cust_order_handling_inst(rr)); + if (rr.smp_id().size()) { + update_encoding.add(rr.smp_id()); + if (rr.smp_instruction() != SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED) + update_encoding.add( + rr.smp_instruction()); + } + + update_encoding.add(clordid); + update_encoding.add(clordid); + update_encoding.add(true); + me->update_transact_time_bm = update_encoding.add( + datetime::FIX_timestamp(datetime::now())); + me->update_quantity_bm = + update_encoding.add(0, quantity_sz()); + me->update_corid_bm = + update_encoding.add(std::string(corid_sz(), ' ')); + + // initialize cancel FIX + auto &cancel_encoding = me->cancel_encoding; + cancel_encoding.add(rr.operator_id()); + cancel_encoding.add(rr.location()); + cancel_encoding.add(rr.account()); + cancel_encoding.add(def.side()); + cancel_encoding.add(def.time_in_force()); + cancel_encoding.add(def.manual_order_indicator()); + cancel_encoding.add(sec.glbx().security_desc()); + cancel_encoding.add(clordid); + cancel_encoding.add(clordid); + cancel_encoding.add(clordid); + me->cancel_transact_time_bm = cancel_encoding.add( + datetime::FIX_timestamp(datetime::now())); + + // special tags + switch (def.custom_def().custom_case()) { + case CustomOrderDefinition::kMarket: + // type + create_encoding.add(NATIVE_ORDER_TYPE_MARKET); + update_encoding.add(NATIVE_ORDER_TYPE_MARKET); + cancel_encoding.add(NATIVE_ORDER_TYPE_MARKET); + break; + + case CustomOrderDefinition::kLimit: + // type + create_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + + // price + me->create_price_bm = create_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_price_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + break; + + case CustomOrderDefinition::kStop: { + // type + create_encoding.add(NATIVE_ORDER_TYPE_STOP); + + // stop px + auto stop_px = def.custom_def().stop().stop_price(); + auto encoded_stop_px = + securities::encode_exchange_price(*me->security, Price(stop_px)) + .value(); + + // Stop orders go through two stages. Before the stop price is + // triggered they are stop orders and have no price field, only + // stop px. After being triggered they become regular limit + // orders and have only price, not stop px fields. + if (stop_order_has_been_triggered) { + update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + me->update_price_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_stop_px_bm = {}; + } else { + update_encoding.add(NATIVE_ORDER_TYPE_STOP); + cancel_encoding.add(NATIVE_ORDER_TYPE_STOP); + me->update_price_bm = {}; + me->update_stop_px_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + } + create_encoding.add(encoded_stop_px, + price_encoding_precision, -1); + break; + } + + case CustomOrderDefinition::kStopLimit: { + // type + create_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); + + // stop px + auto stop_px = def.custom_def().stop_limit().stop_price(); + auto encoded_stop_px = + securities::encode_exchange_price(*me->security, Price(stop_px)) + .value(); + + // Like stop orders, stop limits go through two stages. Before + // the stop price is triggered they are stop limit orders and + // have both a price and a stop px price field. After being + // triggered they become regular limit orders and have only + // price, not stop px fields. + if (stop_order_has_been_triggered) { + update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + me->update_price_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_stop_px_bm = {}; + } else { + update_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); + cancel_encoding.add(NATIVE_ORDER_TYPE_STOP_LIMIT); + me->create_price_bm = create_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_price_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_stop_px_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + } + + create_encoding.add(encoded_stop_px, + price_encoding_precision, -1); + break; + } + case CustomOrderDefinition::kGlbxIceberg: { + + // type, still a limit order but we use a show quantity + create_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + update_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + cancel_encoding.add(NATIVE_ORDER_TYPE_LIMIT); + + // price + me->create_price_bm = create_encoding.add( + 0, price_encoding_precision, price_sz()); + me->update_price_bm = update_encoding.add( + 0, price_encoding_precision, price_sz()); + + // max show qty + auto max_show_qty = def.custom_def().glbx_iceberg().max_show_quantity(); + create_encoding.add(max_show_qty); + me->update_max_show_bm = + update_encoding.add(max_show_qty, max_show_sz()); + break; + } + + default: + bts_assert(false); + break; + } +} + +void iLink2OrderEncoder::update_exchange_order_id(ExchangeOrderIDVar const&v) { + auto oid = to_trim_str(std::get(v)); + me->update_encoding.add(oid); + me->cancel_encoding.add(oid); +} + +void iLink2OrderEncoder::update_create_order_encoding(Price p, + int price_precision, + Quantity q, + OrderServices &services) { + auto &encoding = me->create_encoding; + + switch (me->order_type) { + case CustomOrderDefinition::kLimit: + case CustomOrderDefinition::kStopLimit: + case CustomOrderDefinition::kGlbxIceberg: + me->create_price_bm = encoding.overwrite( + me->create_price_bm, + securities::encode_exchange_price(*me->security, p).value(), + price_precision, price_sz()); + break; + case CustomOrderDefinition::kStop: + case CustomOrderDefinition::kMarket: + break; + default: + bts_assert(false); + break; + } + + me->create_quantity_bm = + encoding.overwrite(me->create_quantity_bm, q.value(), quantity_sz()); + + auto &ts = services.get_time_str(); + auto corid = services.corid(); + me->create_transact_time_bm = encoding.overwrite( + me->create_transact_time_bm, &ts.value()[0], ts.value().size()); + me->create_corid_bm = update_corid(me->create_corid_bm, encoding, corid); +} + +void iLink2OrderEncoder::update_cancel_replace_stop_px(Price stop_px, + int price_precision) { + auto &encoding = me->update_encoding; + me->update_stop_px_bm = encoding.overwrite( + me->update_stop_px_bm, + securities::encode_exchange_price(*me->security, stop_px).value(), + price_precision, price_sz()); +} + +void iLink2OrderEncoder::update_cancel_replace_max_show(Quantity max_show) { + auto &encoding = me->update_encoding; + me->update_max_show_bm = encoding.overwrite(me->update_max_show_bm, + max_show.value(), quantity_sz()); +} + +void iLink2OrderEncoder::update_cancel_replace_encoding( + Price p, int price_precision, Quantity q, OrderServices &services) { + auto &encoding = me->update_encoding; + + me->update_price_bm = encoding.overwrite( + me->update_price_bm, + securities::encode_exchange_price(*me->security, p).value(), + price_precision, price_sz()); + me->update_quantity_bm = + encoding.overwrite(me->update_quantity_bm, q.value(), quantity_sz()); + + auto &ts = services.get_time_str(); + auto corid = services.corid(); + me->update_transact_time_bm = encoding.overwrite( + me->update_transact_time_bm, &ts.value()[0], ts.value().size()); + me->update_corid_bm = update_corid(me->update_corid_bm, encoding, corid); +} + +void iLink2OrderEncoder::update_cancel_replace_encoding( + Quantity q, OrderServices &services) { + auto &encoding = me->update_encoding; + me->update_quantity_bm = + encoding.overwrite(me->update_quantity_bm, q.value(), quantity_sz()); + auto &ts = services.get_time_str(); + auto corid = services.corid(); + me->update_transact_time_bm = encoding.overwrite( + me->update_transact_time_bm, &ts.value()[0], ts.value().size()); + me->update_corid_bm = update_corid(me->update_corid_bm, encoding, corid); +} + +void iLink2OrderEncoder::update_cancel_replace_encoding( + Price p, int price_precision, OrderServices &services) { + + auto &encoding = me->update_encoding; + + me->update_price_bm = encoding.overwrite( + me->update_price_bm, + securities::encode_exchange_price(*me->security, p).value(), + price_precision, price_sz()); + auto &ts = services.get_time_str(); + auto corid = services.corid(); + me->update_transact_time_bm = encoding.overwrite( + me->update_transact_time_bm, &ts.value()[0], ts.value().size()); + me->update_corid_bm = update_corid(me->update_corid_bm, encoding, corid); +} + + +void iLink2OrderEncoder::update_cancel_encoding(OrderServices &services) { + auto &encoding = me->cancel_encoding; + auto &ts = services.get_time_str(); + me->cancel_transact_time_bm = encoding.overwrite( + me->cancel_transact_time_bm, &ts.value()[0], ts.value().size()); +} + +void iLink2OrderEncoder::send_create(OrderServices &s, SessionServices &os) { + s.queue_fix(os, jetfix::MessageTypes::NewOrderSingle, me->create_encoding); +} + +void iLink2OrderEncoder::send_cancel_replace(OrderServices &s, + SessionServices &os) { + s.queue_fix(os, jetfix::MessageTypes::CancelReplace, me->update_encoding); +} + +void iLink2OrderEncoder::send_cancel(OrderServices &s, SessionServices &os) { + s.queue_fix(os, jetfix::MessageTypes::Cancel, me->cancel_encoding); +} + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/glbx/iLink2OrderEncoder.h b/src/lib/orderman/orders/glbx/iLink2OrderEncoder.h new file mode 100644 index 000000000..baceb64f4 --- /dev/null +++ b/src/lib/orderman/orders/glbx/iLink2OrderEncoder.h @@ -0,0 +1,39 @@ +#pragma once +#include "lib/orderman/orders/glbx/IGLBXOrderEncoder.h" + +namespace bts { +namespace orderman { + +class iLink2OrderEncoder : public IGLBXOrderEncoder { + public: + iLink2OrderEncoder(); + ~iLink2OrderEncoder() override; + + virtual void init(OrderKey key, api::orderman::RoutingRecord const &, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int price_encoding_precision, + bool stop_order_has_been_triggered) override; + void update_exchange_order_id(ExchangeOrderIDVar const&) override; + void update_create_order_encoding(Price p, int price_precision, Quantity q, + OrderServices &services) override; + void update_cancel_replace_stop_px(Price stop_px, + int price_precision) override; + void update_cancel_replace_max_show(Quantity max_show) override; + void update_cancel_replace_encoding(Price, int price_precision, Quantity, + OrderServices &) override; + void update_cancel_replace_encoding(Quantity q, OrderServices &) override; + void update_cancel_replace_encoding(Price p, int price_precision, + OrderServices &) override; + void update_cancel_encoding(OrderServices &) override; + void send_create(OrderServices &, SessionServices &) override; + void send_cancel_replace(OrderServices &, SessionServices &) override; + void send_cancel(OrderServices &, SessionServices &) override; + + private: + struct PImpl; + std::unique_ptr me; +}; + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/glbx/iLink3OrderEncoder.cpp b/src/lib/orderman/orders/glbx/iLink3OrderEncoder.cpp new file mode 100644 index 000000000..ae29485df --- /dev/null +++ b/src/lib/orderman/orders/glbx/iLink3OrderEncoder.cpp @@ -0,0 +1,179 @@ +#include "iLink3OrderEncoder.h" + +#include "lib/api/services/OrderService.pb.h" +#include "lib/domain_model/Security.h" +#include "lib/orderman/actors/IExecutionGateway.h" +#include "lib/orderman/actors/order_manager/OrderServices.h" +#include "lib/orderman/orderman_utils/fix_order_codec.h" + +namespace bts { +namespace orderman { + +using namespace api::orderman; + +struct iLink3OrderEncoder::PImpl { + PImpl() {} + + CustomOrderDefinition::CustomCase order_type; + api::Security const *security; + CreateOrderMsg create; + CancelReplaceOrderMsg cancel_replace; + CancelOrderMsg cancel; + std::string clordid; + + api::orderman::RoutingRecord const &rr() { return *interned_rrs.back(); } + + api::orderman::RoutingRecord const & + intern_routing_record(api::orderman::RoutingRecord const &r) { + interned_rrs.push_back(std::make_unique(r)); + return rr(); + } + + private: + std::vector> interned_rrs; +}; + +iLink3OrderEncoder::iLink3OrderEncoder() : me(new PImpl()) {} +iLink3OrderEncoder::~iLink3OrderEncoder() {} + +void iLink3OrderEncoder::init(OrderKey key, + api::orderman::RoutingRecord const &rec, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int , + bool) { + using namespace jetfix; + + me->security = &security; + me->order_type = def.custom_def().custom_case(); + + auto const &sec = security; + auto const &rr = me->intern_routing_record(rec); + + // Create template + me->create.price = Price(0); + me->create.quantity = Quantity(0); + me->create.security = &sec; + me->create.side = def.side(); + me->create.key = key; + me->create.time_in_force = def.time_in_force(); + me->create.manual_order_indicator = def.manual_order_indicator(); + + me->create.order_type = NATIVE_ORDER_TYPE_MARKET; + me->create.stop_px = Price(0); + me->create.display_quantity = Quantity(0); + me->create.routing_record = &rr; + + switch (def.custom_def().custom_case()) { + case CustomOrderDefinition::kMarket: + me->create.order_type = NATIVE_ORDER_TYPE_MARKET; + break; + case CustomOrderDefinition::kLimit: + me->create.order_type = NATIVE_ORDER_TYPE_LIMIT; + break; + case CustomOrderDefinition::kStop: { + me->create.order_type = NATIVE_ORDER_TYPE_STOP; + auto stop_px = def.custom_def().stop().stop_price(); + me->create.stop_px = + securities::encode_exchange_price(*me->security, Price(stop_px)); + break; + } + case CustomOrderDefinition::kStopLimit: { + me->create.order_type = NATIVE_ORDER_TYPE_STOP_LIMIT; + auto stop_px = def.custom_def().stop_limit().stop_price(); + me->create.stop_px = + securities::encode_exchange_price(*me->security, Price(stop_px)); + break; + } + case CustomOrderDefinition::kGlbxIceberg: { + me->create.order_type = NATIVE_ORDER_TYPE_LIMIT; + auto max_show_qty = + Quantity(def.custom_def().glbx_iceberg().max_show_quantity()); + me->create.display_quantity = max_show_qty; + break; + } + default: + bts_assert(false); + break; + } + + // Cancel Replace template + me->cancel_replace.create_fields = me->create; + me->cancel_replace.exchange_order_id = ExchangeOrderID64(0); + + // Cancel template + me->cancel.exchange_order_id = ExchangeOrderID64(0); + me->cancel.manual_order_indicator = me->create.manual_order_indicator; + me->cancel.key = key; + me->cancel.security = me->create.security; + me->cancel.side = me->create.side; + me->cancel.routing_record = &rr; +} + +void iLink3OrderEncoder::update_exchange_order_id(ExchangeOrderIDVar const&v) { + me->cancel_replace.exchange_order_id = std::get (v); + me->cancel.exchange_order_id = me->cancel_replace.exchange_order_id; +} + +void iLink3OrderEncoder::update_create_order_encoding(Price p, int, Quantity q, + OrderServices &) { + + switch (me->order_type) { + case CustomOrderDefinition::kLimit: + case CustomOrderDefinition::kStopLimit: + case CustomOrderDefinition::kGlbxIceberg: + me->create.price = securities::encode_exchange_price(*me->security, p); + break; + case CustomOrderDefinition::kStop: + case CustomOrderDefinition::kMarket: + break; + default: + bts_assert(false); + break; + } + me->create.quantity = q; +} + +void iLink3OrderEncoder::update_cancel_replace_stop_px(Price stop_px, int) { + me->cancel_replace.create_fields.stop_px = + securities::encode_exchange_price(*me->security, stop_px); +} + +void iLink3OrderEncoder::update_cancel_replace_max_show(Quantity max_show) { + me->cancel_replace.create_fields.display_quantity = max_show; +} + +void iLink3OrderEncoder::update_cancel_replace_encoding(Price p, int, + Quantity q, + OrderServices &) { + me->cancel_replace.create_fields.price = + securities::encode_exchange_price(*me->security, p); + me->cancel_replace.create_fields.quantity = q; +} + +void iLink3OrderEncoder::update_cancel_replace_encoding(Quantity q, OrderServices &) { + me->cancel_replace.create_fields.quantity = q; +} + +void iLink3OrderEncoder::update_cancel_replace_encoding(Price p, int, + OrderServices &) { + me->cancel_replace.create_fields.price = + securities::encode_exchange_price(*me->security, p); +} + +void iLink3OrderEncoder::update_cancel_encoding(OrderServices&) {} + +void iLink3OrderEncoder::send_create(OrderServices&s,SessionServices&os) { + s.queue_order_msg(os,me->create); +} + +void iLink3OrderEncoder::send_cancel_replace(OrderServices&s,SessionServices&os) { + s.queue_order_msg(os,me->cancel_replace); +} + +void iLink3OrderEncoder::send_cancel(OrderServices&s,SessionServices&os) { + s.queue_order_msg(os,me->cancel); +} + +} // namespace orderman +} // namespace bts diff --git a/src/lib/orderman/orders/glbx/iLink3OrderEncoder.h b/src/lib/orderman/orders/glbx/iLink3OrderEncoder.h new file mode 100644 index 000000000..28cbba7d2 --- /dev/null +++ b/src/lib/orderman/orders/glbx/iLink3OrderEncoder.h @@ -0,0 +1,37 @@ +#pragma once +#include "lib/orderman/orders/glbx/IGLBXOrderEncoder.h" + +namespace bts { +namespace orderman { + +class iLink3OrderEncoder : public IGLBXOrderEncoder { + public: + iLink3OrderEncoder(); + ~iLink3OrderEncoder() override; + virtual void init(OrderKey key, api::orderman::RoutingRecord const &, + api::Security const &security, + api::orderman::OrderDefinition const &def, + int price_encoding_precision, + bool stop_order_has_been_triggered) override; + void update_exchange_order_id(ExchangeOrderIDVar const&) override; + void update_create_order_encoding(Price p, int price_precision, Quantity q, + OrderServices &services) override; + void update_cancel_replace_stop_px(Price stop_px, + int price_precision) override; + void update_cancel_replace_max_show(Quantity max_show) override; + void update_cancel_replace_encoding(Price, int price_precision, Quantity, + OrderServices &) override; + void update_cancel_replace_encoding(Quantity, OrderServices &) override; + void update_cancel_replace_encoding(Price, int, OrderServices &) override; + void update_cancel_encoding(OrderServices &) override; + void send_create(OrderServices &, SessionServices &) override; + void send_cancel_replace(OrderServices &, SessionServices &) override; + void send_cancel(OrderServices &, SessionServices &) override; + + private: + struct PImpl; + std::unique_ptr me; +}; + +} // namespace orderman +} // namespace bts diff --git a/src/lib/utils/Dispatcher.cpp b/src/lib/utils/Dispatcher.cpp old mode 100755 new mode 100644 index c45d28c54..1a6606649 --- a/src/lib/utils/Dispatcher.cpp +++ b/src/lib/utils/Dispatcher.cpp @@ -1,19 +1,21 @@ #ifndef NO_CPP0X #include "Dispatcher.h" -#include -#include "lib/utils/bts_assert.h" #include "../os/os.h" #include "defer.h" -#include "lib/utils/bts_chrono.h" #include "lib/logging/logging.h" +#include "lib/utils/bts_assert.h" +#include "lib/utils/bts_chrono.h" #include "lib/utils/thread_manager.h" +#include "lib/utils/type_name.h" +#include #include +#include +#include #include #include -#include #include #include @@ -23,15 +25,10 @@ using namespace boost::asio; namespace bts { namespace utils { -struct DispatcherImpl -{ -public: - DispatcherImpl() : - thread(std::this_thread::get_id()), - service(), - work(), - is_pool(false) - { +struct DispatcherImpl { + public: + DispatcherImpl() + : thread(std::this_thread::get_id()), service(), work(), is_pool(false) { } std::thread::id thread; @@ -40,10 +37,7 @@ public: bool is_pool; }; - -Dispatcher::Dispatcher() : - _me(new DispatcherImpl()) -{ +Dispatcher::Dispatcher() : _me(new DispatcherImpl()) { #ifdef _WIN32 _mm_mfence(); #else @@ -51,27 +45,23 @@ Dispatcher::Dispatcher() : #endif } -void wait_for_stop(io_service& service) -{ - while(!service.stopped()) - { +void wait_for_stop(io_service &service) { + while (!service.stopped()) { std::this_thread::sleep_for(1ms); } } -Dispatcher::~Dispatcher() -{ - if (!_me->service.stopped()) - { +Dispatcher::~Dispatcher() { + if (!_me->service.stopped()) { _me->work.reset(); _me->service.stop(); wait_for_stop(_me->service); } } -void Dispatcher::run(size_t threads) -{ - bts_assert_msg(_me && _me->work == nullptr, "Error dispatcher is already running."); +void Dispatcher::run(size_t threads) { + bts_assert_msg(_me && _me->work == nullptr, + "Error dispatcher is already running."); _me->service.reset(); _me->work.reset(new io_service::work(_me->service)); DEFER(_me->work.reset()); @@ -84,74 +74,69 @@ void Dispatcher::run(size_t threads) void Dispatcher::add_thread() { _me->is_pool = true; - auto t = threading::make_thread("DispatcherPool",[=] () {_me->service.run();}); + auto t = + threading::make_thread("DispatcherPool", [=]() { _me->service.run(); }); t.detach(); } -bool Dispatcher::is_threadpool() { - return _me->is_pool; -} +bool Dispatcher::is_threadpool() { return _me->is_pool; } -bool Dispatcher::is_running() -{ +bool Dispatcher::is_running() { return _me->work != nullptr && !_me->service.stopped(); } -void Dispatcher::terminate() -{ +void Dispatcher::terminate() { // allows run() to exit normally _me->work.reset(); - // At this point this Dispatcher instance may be asyncronously deleted and is no longer safe to use. + // At this point this Dispatcher instance may be asyncronously deleted and is + // no longer safe to use. } -bool Dispatcher::check_access() -{ +bool Dispatcher::check_access() { return std::this_thread::get_id() == _me->thread; } - boost::thread_specific_ptr _tl_dispatchers; -Dispatcher& Dispatcher::current() { +Dispatcher &Dispatcher::current() { if (_tl_dispatchers.get() == nullptr) { _tl_dispatchers.reset(new Dispatcher()); } return *(_tl_dispatchers.get()); } -Dispatcher& Dispatcher::get_named(const char* name) { +Dispatcher &Dispatcher::get_named(const char *name) { static std::mutex mutex; - static std::map s_dispatchers; + static std::map s_dispatchers; std::lock_guard lock(mutex); auto result = s_dispatchers.find(name); if (result != s_dispatchers.end()) { return *result->second; } - - Dispatcher& d = create_new(name); + + Dispatcher &d = create_new(name); s_dispatchers[name] = &d; return d; } -Dispatcher& Dispatcher::background() -{ - static Dispatcher* s_dispatcher = nullptr; - Dispatcher** p_s_dispatcher = &s_dispatcher; - if (s_dispatcher == nullptr) - { +Dispatcher &Dispatcher::background() { + static Dispatcher *s_dispatcher = nullptr; + Dispatcher **p_s_dispatcher = &s_dispatcher; + if (s_dispatcher == nullptr) { *p_s_dispatcher = &get_named("DispatcherBG"); } return *s_dispatcher; } -Dispatcher& Dispatcher::create_new(const char* name) { - Dispatcher* new_dispatcher = nullptr; +Dispatcher &Dispatcher::create_new(const char *name) { + Dispatcher *new_dispatcher = nullptr; mutex m; condition_variable c; - // Take the lock before starting the thread to ensure c.notify_all() cannot happen before we wait on the condition + // Take the lock before starting the thread to ensure c.notify_all() cannot + // happen before we wait on the condition unique_lock lock(m); - auto t = threading::make_thread(name,[&]() { - Dispatcher& temp = current(); + auto t = threading::make_thread(name, [&]() { + Dispatcher &temp = current(); try { temp.post([&]() { unique_lock lock(m); @@ -159,104 +144,96 @@ Dispatcher& Dispatcher::create_new(const char* name) { c.notify_all(); }); temp.run(); - } - catch(const std::exception& ex) { - LOG(Gen,Error ,"Exception on dispatcher thread: {}" ,std::string(ex.what())); - bts_assert_msg(false, ex.what()); + } catch (const std::exception &ex) { + auto msg = fmt::format( + "Exception on dispatcher thread. What: {} Exception type: {}", + ex.what(), utils::type_name(typeid(ex))); + bts_assert_msg(false,msg); } }); t.detach(); - auto result = c.wait_for(lock, chrono::seconds(5));// releases the lock temporarily - bts_assert_msg(result == cv_status::no_timeout, "Dispatcher failed to start."); + auto result = + c.wait_for(lock, chrono::seconds(5)); // releases the lock temporarily + bts_assert_msg(result == cv_status::no_timeout, + "Dispatcher failed to start."); bts_assert(new_dispatcher); // Could happen to to spurious wake return *new_dispatcher; } -void Dispatcher::invoke(Action action) -{ +void Dispatcher::invoke(Action action) { bts_assert(!_me->service.stopped()); // If we're calling from the thread that owns this dispatcher // We can just call the function - to do otherwise would result in deadlock - if (check_access()) - { + if (check_access()) { action(); return; } - + mutex m; condition_variable c; unique_lock lock(m); bool complete = false; - _me->service.dispatch([&]() - { + _me->service.dispatch([&]() { action(); unique_lock lock(m); complete = true; c.notify_all(); }); - while(!complete) { + while (!complete) { c.wait(lock); } } -void Dispatcher::post(Action&& action, int64_t delay_ms) -{ - if (delay_ms > 0) - { - shared_ptr timer = make_shared(_me->service); +void Dispatcher::post(Action &&action, int64_t delay_ms) { + if (delay_ms > 0) { + shared_ptr timer = + make_shared(_me->service); timer->expires_from_now(boost::posix_time::milliseconds(delay_ms)); - timer->async_wait([timer, action] (const boost::system::error_code& err) { if (!err) action(); }); - } - else - { + timer->async_wait([timer, action](const boost::system::error_code &err) { + if (!err) + action(); + }); + } else { _me->service.post(action); } } -void Dispatcher::post_copy(Action action, int64_t delay_ms) -{ - if (delay_ms > 0) - { - shared_ptr timer = make_shared(_me->service); +void Dispatcher::post_copy(Action action, int64_t delay_ms) { + if (delay_ms > 0) { + shared_ptr timer = + make_shared(_me->service); timer->expires_from_now(boost::posix_time::milliseconds(delay_ms)); - timer->async_wait([timer, action] (const boost::system::error_code& err) { if (!err) action(); }); - } - else - { + timer->async_wait([timer, action](const boost::system::error_code &err) { + if (!err) + action(); + }); + } else { _me->service.post(action); } } -io_service* Dispatcher::io_service() { return &_me->service; } +io_service *Dispatcher::io_service() { return &_me->service; } // // DispatcherTimer // -struct DispatcherTimerImpl -{ - DispatcherTimerImpl(Dispatcher& dispatcher, int64_t ms, Action& cb) : - running(false), - callback(cb), - delay(ms), - timer(new deadline_timer(dispatcher._me->service)) - { - } +struct DispatcherTimerImpl { + DispatcherTimerImpl(Dispatcher &dispatcher, int64_t ms, Action &cb) + : running(false), callback(cb), delay(ms), + timer(new deadline_timer(dispatcher._me->service)) {} - void schedule() - { - if (running) - { + void schedule() { + if (running) { timer->expires_from_now(boost::posix_time::milliseconds(delay)); - timer->async_wait(std::bind(&DispatcherTimerImpl::execute, this, std::placeholders::_1)); + timer->async_wait(std::bind(&DispatcherTimerImpl::execute, this, + std::placeholders::_1)); } } - void execute(const boost::system::error_code& error) - { - if (!error) - { + void execute(const boost::system::error_code &error) { + if (!error) { callback(); schedule(); } @@ -268,49 +245,38 @@ struct DispatcherTimerImpl unique_ptr timer; }; +DispatcherTimer::DispatcherTimer(Dispatcher &dispatcher, int64_t time_ms, + Action cb) + : _me(new DispatcherTimerImpl(dispatcher, time_ms, cb)) {} -DispatcherTimer::DispatcherTimer(Dispatcher& dispatcher, int64_t time_ms, Action cb) - : _me(new DispatcherTimerImpl(dispatcher, time_ms, cb)) -{ -} +DispatcherTimer::DispatcherTimer(DispatcherTimer &&other) + : _me(std::move(other._me)) {} -DispatcherTimer::DispatcherTimer(DispatcherTimer&& other) : _me(std::move(other._me)) {} +DispatcherTimer::~DispatcherTimer() {} - -DispatcherTimer::~DispatcherTimer() { } - -void DispatcherTimer::start() -{ +void DispatcherTimer::start() { if (!running()) { _me->running = true; _me->schedule(); } } -void DispatcherTimer::stop() -{ +void DispatcherTimer::stop() { _me->running = false; _me->timer->cancel(); } - -bool DispatcherTimer::running() -{ - return _me->running; -} -void DispatcherTimer::set_interval(int64_t time_ms) -{ +bool DispatcherTimer::running() { return _me->running; } + +void DispatcherTimer::set_interval(int64_t time_ms) { // This invalidates existing waits so restart _me->timer->expires_from_now(boost::posix_time::milliseconds(time_ms)); _me->schedule(); } -void DispatcherTimer::set_callback(Action cb) -{ - _me->callback = cb; -} +void DispatcherTimer::set_callback(Action cb) { _me->callback = cb; } - -}}//namespace +} // namespace utils +} // namespace bts #endif diff --git a/src/lib/utils/PBUtils.cpp b/src/lib/utils/PBUtils.cpp index 908b84712..8b2fcc453 100755 --- a/src/lib/utils/PBUtils.cpp +++ b/src/lib/utils/PBUtils.cpp @@ -30,4 +30,5 @@ google::protobuf::Timestamp to_timestamp(datetime::PTime const &t) return gts; } + }}} diff --git a/src/lib/utils/ReentrancyGuard.h b/src/lib/utils/ReentrancyGuard.h new file mode 100644 index 000000000..cc0bd4f59 --- /dev/null +++ b/src/lib/utils/ReentrancyGuard.h @@ -0,0 +1,37 @@ +#pragma once +namespace bts { +namespace utils { + +template class ReentrancyGuard { + using PendingInvocation = stdext::inplace_function; + using PendingQueue = boost::container::small_vector; + +public: + ReentrancyGuard(Owner &owner) + : _owner(owner), _busy(false), _queue() {} + + template + void invoke(M m, Args&&... args) { + if (!_busy) { + _busy = true; + (_owner.*m)(std::forward(args)...); + for (size_t i = 0; i < _queue.size(); i++) { + auto cb = _queue[i]; + cb(_owner); + } + _queue.clear(); + _busy = false; + } else { + _queue.emplace_back(PendingInvocation([m, args...](Owner &owner) { + (owner.*m)(args...); + })); + } + } + + private: + Owner &_owner; + bool _busy; + PendingQueue _queue; +}; + +}}//ns \ No newline at end of file diff --git a/src/lib/utils/SecureLogon.cpp b/src/lib/utils/SecureLogon.cpp index 62a24e00f..342b542e2 100644 --- a/src/lib/utils/SecureLogon.cpp +++ b/src/lib/utils/SecureLogon.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include // #include "catch/catch.hpp" @@ -94,42 +95,8 @@ std::tuple load_session_keys(const string& session) { bts_assert_msg(false, error); } -LogonData calculate_hmac( - const std::string& session_id, - const std::string& msg_seq_num, - const std::string& sender_comp_id, - const std::string& sender_sub_id, - const std::string& sending_time, - const std::string& target_sub_id, - const std::string& heartbeat_interval, - const std::string& sender_location_id, - const std::string& last_seq_num, - const std::string& application_system_name, - const std::string& application_system_version, - const std::string& application_system_vendor - ) { - string canonical; - canonical += msg_seq_num; - canonical += '\n'; - canonical += sender_comp_id; - canonical += '\n'; - canonical += sender_sub_id; - canonical += '\n'; - canonical += sending_time; - canonical += '\n'; - canonical += target_sub_id; - canonical += '\n'; - canonical += heartbeat_interval; - canonical += '\n'; - canonical += sender_location_id; - canonical += '\n'; - canonical += last_seq_num; - canonical += '\n'; - canonical += application_system_name; - canonical += '\n'; - canonical += application_system_version; - canonical += '\n'; - canonical += application_system_vendor; +LogonData calculate_hmac(const std::string& session_id, const std::vector& values) { + string canonical = boost::algorithm::join(values, "\n"); string secret_key, access_id; std::tie(access_id, secret_key) = load_session_keys(session_id); @@ -147,7 +114,7 @@ LogonData calculate_hmac( string encoded_hmac; StringSource(calculated_hmac, true, new Base64URLEncoder(new StringSink(encoded_hmac))); - return { access_id, encoded_hmac, canonical}; + return LogonData { access_id, encoded_hmac, calculated_hmac, canonical}; } catch(const Exception& e) { bts_assert_msg(false, e.what()); diff --git a/src/lib/utils/SecureLogon.h b/src/lib/utils/SecureLogon.h index 7e5376349..a3b8e7045 100644 --- a/src/lib/utils/SecureLogon.h +++ b/src/lib/utils/SecureLogon.h @@ -1,29 +1,41 @@ #pragma once #include +#include namespace bts { namespace glbx { struct LogonData { std::string access_key; - std::string signature; + std::string signature; // base64 encoded + std::string hmac; std::string canonical; }; +LogonData calculate_hmac(const std::string& session_id, const std::vector&); + +template LogonData calculate_hmac( - const std::string& session_id, - const std::string& msg_seq_num, - const std::string& sender_comp_id, - const std::string& sender_sub_id, - const std::string& sending_time, - const std::string& target_sub_id, - const std::string& heartbeat_interval, - const std::string& sender_location_id, - const std::string& last_seq_num, - const std::string& application_system_name, - const std::string& application_system_version, - const std::string& application_system_vendor - ); + const std::string& session_id, + Ts... inputs) { + return calculate_hmac(session_id, std::vector { inputs... }); +} + +// CME FIX +// LogonData calculate_hmac( +// const std::string& session_id, +// const std::string& msg_seq_num, +// const std::string& sender_comp_id, +// const std::string& sender_sub_id, +// const std::string& sending_time, +// const std::string& target_sub_id, +// const std::string& heartbeat_interval, +// const std::string& sender_location_id, +// const std::string& last_seq_num, +// const std::string& application_system_name, +// const std::string& application_system_version, +// const std::string& application_system_vendor +// ); } } diff --git a/src/lib/utils/ValueWrapper.h b/src/lib/utils/ValueWrapper.h index 5df5e2ace..d84d5f05e 100644 --- a/src/lib/utils/ValueWrapper.h +++ b/src/lib/utils/ValueWrapper.h @@ -25,8 +25,8 @@ public: bool operator!=(ValueWrapper const&v) const {return _v != v._v;} bool operator<(ValueWrapper const&v) const {return _v < v._v;} bool operator>(ValueWrapper const&v) const {return _v > v._v;} - ValueT const& value() const {return _v;} - ValueT & value() {return _v;} + constexpr ValueT const& value() const {return _v;} + constexpr ValueT & value() {return _v;} private: ValueT _v; }; diff --git a/src/lib/utils/datetime.cpp b/src/lib/utils/datetime.cpp index 9fb4db93f..83eafe3fb 100755 --- a/src/lib/utils/datetime.cpp +++ b/src/lib/utils/datetime.cpp @@ -44,6 +44,17 @@ LLDateTime ll_local_now() { long unix_now() { return (boost::posix_time::microsec_clock::universal_time() - PTime(anchor)).total_microseconds() / (long)1E6; } +#ifndef _WIN32 +uint64_t unix_nano_now() { + struct timespec ts; + // CLOCK_REALTIME is already anchored at the unix epoch + clock_gettime(CLOCK_REALTIME, &ts); + return + static_cast(1000000000UL)* + static_cast(ts.tv_sec) + + static_cast(ts.tv_nsec); +} +#endif std::chrono::system_clock::time_point utc_ll_to_timepoint(unsigned long long ll) { auto us_since_epoch = ((ll & ticks_mask) - anchor_ticks) / ticks_per_micro; diff --git a/src/lib/utils/datetime.h b/src/lib/utils/datetime.h index 62384ed69..8cb63979d 100755 --- a/src/lib/utils/datetime.h +++ b/src/lib/utils/datetime.h @@ -41,6 +41,7 @@ extern "C" BTS_EXPORT LLDateTime ll_local_now (); extern "C" BTS_EXPORT double OA_date_from_ll (LLDateTime ll); extern "C" BTS_EXPORT LLDateTime ll_from_OA_date (double oa_date); extern "C" BTS_EXPORT long unix_now(); +uint64_t unix_nano_now(); BTS_EXPORT std::chrono::system_clock::time_point utc_ll_to_timepoint(unsigned long long ll) ; BTS_EXPORT PTime now (); diff --git a/src/lib/utils/overloaded.h b/src/lib/utils/overloaded.h new file mode 100644 index 000000000..c3b6c2627 --- /dev/null +++ b/src/lib/utils/overloaded.h @@ -0,0 +1,10 @@ +#pragma once + +#if __cplusplus >= 201703L +#include +// Helper to visit std::variant +namespace bts { +template struct overloaded : Ts... { using Ts::operator()...; }; +template overloaded(Ts...) -> overloaded; // not needed as of C++20 +} +#endif diff --git a/src/lib/utils/type_name.h b/src/lib/utils/type_name.h index fab7440b9..bf68e8dbf 100644 --- a/src/lib/utils/type_name.h +++ b/src/lib/utils/type_name.h @@ -9,14 +9,23 @@ namespace utils { template const char* type_name() { +#ifdef __GNUC__ int status; return abi::__cxa_demangle(typeid (T).name (), 0, 0, &status); +#else + return typeid (T).name (); +#endif } inline const char*type_name(std::type_info const&ti) { +#ifdef __GNUC__ int status; return abi::__cxa_demangle(ti.name (), 0, 0, &status); +#else + return ti.name(); +#endif + } }} diff --git a/src/server/sparkd/CMakeDeps.cmake b/src/server/sparkd/CMakeDeps.cmake index 884d760c5..6b315cfa2 100644 --- a/src/server/sparkd/CMakeDeps.cmake +++ b/src/server/sparkd/CMakeDeps.cmake @@ -1 +1 @@ -set(sources algo/AlgoDefinitionServiceServer.cpp;cmds/AdminReport.cpp;cmds/AutoCert.cpp;cmds/Benchmark.cpp;cmds/CmdRegistry.cpp;cmds/ConfigCheck.cpp;cmds/FIXSim.cpp;cmds/Help.cpp;cmds/KeyCode.cpp;cmds/Md.cpp;cmds/ParseHistoricalFIX.cpp;cmds/PrintHedgeOrders.cpp;cmds/QuickTest.cpp;cmds/Run.cpp;cmds/RunSim.cpp;cmds/Span.cpp;cmds/Test.cpp;cmds/Web.cpp;dspark/mirage/quick_queue/quick_queue.cpp;exchange_sim/ExchangeSim.cpp;exchange_sim/ExchangeSimApplication.cpp;exchange_sim/book/Book.cpp;exchange_sim/book/ExchangeSim.proto;exchange_sim/book/Order.cpp;exchange_sim/book/OrderMatcher.cpp;exchange_sim/book/book_transform.cpp;exchange_sim/tests/test_book_transform.cpp;http/ApiGateway.cpp;http/MultipartFormDecoder.cpp;http/WebServer.cpp;http/tests/MultiPartFormTests.cpp;main.cpp;md/ChannelVolume.cpp;md/MarketDataAuxiliaryServiceServer.cpp;md/VolumeAtPriceState.cpp;md/platforms/IMDPlatform.cpp;md/platforms/ice_onixs/ICEListener.cpp;md/platforms/ice_onixs/ICEMain.cpp;md/platforms/ice_onixs/tests/ice_tests.cpp;md/platforms/mdp3_onixs/MDP3Listener.cpp;md/platforms/mdp3_onixs/MDP3Main.cpp;md/platforms/mdp3_onixs/tests/mdp3_tests.cpp;md/run_md.cpp;position/IPositionObserver.cpp;position/MarginServiceCore.cpp;position/MarginServiceServer.cpp;position/PositionAggregator.cpp;position/PositionMap.cpp;position/PositionServicePNLHelper.cpp;position/PositionServiceServer.cpp;position/import/BasePositionServiceServer.cpp;position/import/DownloadCommonStateMachine.cpp;position/import/DownloadWindow.cpp;position/import/MoneyFileServiceServer.cpp;position/import/parsing/gmi_parser.cpp;position/import/parsing/money_parser.cpp;position/import/parsing/parser_common.cpp;position/tests/PositionTests.cpp;position/tests/position_tests_internal.cpp;subprocess/SubProcessRunner.cpp;support/ErrorReportService.cpp;support/ShellLatencyServer.cpp;user/AdminServiceServer.cpp;user/AuthServiceServer.cpp;user/tests/admin_service_tests.cpp) \ No newline at end of file +set(sources algo/AlgoDefinitionServiceServer.cpp;cmds/AdminReport.cpp;cmds/AutoCert.cpp;cmds/Benchmark.cpp;cmds/CMECertCmd.cpp;cmds/CmdRegistry.cpp;cmds/ConfigCheck.cpp;cmds/FIXSim.cpp;cmds/Help.cpp;cmds/KeyCode.cpp;cmds/Md.cpp;cmds/ParseHistoricalFIX.cpp;cmds/PrintHedgeOrders.cpp;cmds/QuickTest.cpp;cmds/Run.cpp;cmds/RunSim.cpp;cmds/Span.cpp;cmds/Test.cpp;cmds/Web.cpp;dspark/mirage/quick_queue/quick_queue.cpp;exchange_sim/ExchangeSim.cpp;exchange_sim/ExchangeSimApplication.cpp;exchange_sim/book/Book.cpp;exchange_sim/book/ExchangeSim.proto;exchange_sim/book/Order.cpp;exchange_sim/book/OrderMatcher.cpp;exchange_sim/book/book_transform.cpp;exchange_sim/tests/test_book_transform.cpp;http/ApiGateway.cpp;http/MultipartFormDecoder.cpp;http/WebServer.cpp;http/tests/MultiPartFormTests.cpp;main.cpp;md/ChannelVolume.cpp;md/MarketDataAuxiliaryServiceServer.cpp;md/VolumeAtPriceState.cpp;md/platforms/IMDPlatform.cpp;md/platforms/ice_onixs/ICEListener.cpp;md/platforms/ice_onixs/ICEMain.cpp;md/platforms/ice_onixs/tests/ice_tests.cpp;md/platforms/mdp3_onixs/MDP3Listener.cpp;md/platforms/mdp3_onixs/MDP3Main.cpp;md/platforms/mdp3_onixs/tests/mdp3_tests.cpp;md/run_md.cpp;position/IPositionObserver.cpp;position/MarginServiceCore.cpp;position/MarginServiceServer.cpp;position/PositionAggregator.cpp;position/PositionMap.cpp;position/PositionServicePNLHelper.cpp;position/PositionServiceServer.cpp;position/import/BasePositionServiceServer.cpp;position/import/DownloadCommonStateMachine.cpp;position/import/DownloadWindow.cpp;position/import/MoneyFileServiceServer.cpp;position/import/parsing/gmi_parser.cpp;position/import/parsing/money_parser.cpp;position/import/parsing/parser_common.cpp;position/tests/PositionTests.cpp;position/tests/position_tests_internal.cpp;subprocess/SubProcessRunner.cpp;support/ErrorReportService.cpp;support/ShellLatencyServer.cpp;user/AdminServiceServer.cpp;user/AuthServiceServer.cpp;user/tests/admin_service_tests.cpp) \ No newline at end of file diff --git a/src/server/sparkd/cmds/CMECertCmd.cpp b/src/server/sparkd/cmds/CMECertCmd.cpp new file mode 100644 index 000000000..43901e4d7 --- /dev/null +++ b/src/server/sparkd/cmds/CMECertCmd.cpp @@ -0,0 +1,612 @@ +#include "CMECertCmd.h" + +#include "lib/logging/logging.h" +#include "lib/orderman/actors/ilink3/IL3Dispatcher.h" +#include "lib/orderman/actors/ilink3/IL3Reactor.h" +#include "lib/orderman/actors/ilink3/ILink3Utils.h" +#include "lib/orderman/actors/ilink3/IL3GW.h" +#include "lib/os/os.h" +#include "lib/utils/Dispatcher.h" +#include "lib/utils/SecureLogon.h" +#include "lib/utils/TimeStamp.h" + +#include +#include +#include +#include +#include +#include + +namespace bts { +namespace cmd { + +using namespace orderman::ilink3; +using namespace api::orderman; +using namespace bts::orderman; + +void beginning_of_week_logon(IL3GW &gw) { + // Over an iLink connection, submit a Negotiate message . + // Receive and process a Negotiate Response message + // Submit an Establish message to bind connection + // Receive and process a Establishment Acknowledgment message. + // Submit a sequence message + // Receive and process a sequence message + gw.connect(); +} + +struct SessionSaver { + Session current; + std::string path; + SessionSaver() + : current{TimeKeeper().now(), 1, 0}, path{os::sparkdata_path("ilink3") + + "session.txt"} {} + + void save() { + std::ofstream writer(path, std::ios::binary); + writer << current.uuid << " " << current.to_cme << " " + << current.from_cme; + writer.close(); + } + bool load() { + std::ifstream reader(path, std::ios::binary); + if (reader) { + reader >> current.uuid >> current.to_cme >> current.from_cme; + return true; + } + return false; + } + void session_changed(const Session &s) { + current = s; + save(); + } +}; + +struct Securities { + api::Security future1; + Price fsettle1; + api::Security future2; + Price fsettle2; + api::Security spread1; + Price spread_settle; +}; + +Securities &securities() { + api::Security future1; + future1.set_id(100); + future1.mutable_glbx()->set_security_desc("0WSH1"); + future1.mutable_glbx()->set_exchange_id(997820); + api::Security future2; + future2.set_id(101); + future2.mutable_glbx()->set_security_desc("0WSV0"); + future2.mutable_glbx()->set_exchange_id(998140); + api::Security spread; + spread.set_id(200); + spread.mutable_glbx()->set_security_desc("0WSV0-0WSH1"); + spread.mutable_glbx()->set_exchange_id(997800); + static Securities stable = {future1, Price{3674}, future2, + Price{0.5}, spread, Price{-159}}; + return stable; +} + +struct TestRunner { + IL3Reactor &reactor; + IL3GW &gw; + TestRunner(IL3Reactor &reactor, IL3GW &gw) : reactor(reactor), gw(gw) {} + + private: + void run(double seconds = 0) { + auto start = utils::TimeStamp::now(); + while (gw.state() != State::ERROR) { + reactor.do_work(); + if (seconds > 0 && + (utils::TimeStamp::now() - start).seconds() >= seconds) { + break; + } + } + } + + bool run_until(const std::function &test) { + while (gw.state() != State::ERROR) { + reactor.do_work(); + if (test()) { + return true; + } + } + return false; + } + + void interactive_delay() { + // run until a key is pressed + std::future res = std::async([]() { + std::string x; + std::cin >> x; + }); + LOG(OrderMan, Error, "enter a character and hit enter: \n"); + do { + reactor.do_work(); + } while (res.wait_for(std::chrono::milliseconds(1)) != + std::future_status::ready); + } + + void sequence_keepalive_lapse() { + run(32); + gw.send_sequence(true); + gw.flush(); + run(29); + gw.send_terminate(20); + gw.flush(); + } + + const RoutingRecord &get_rr() { + static api::orderman::RoutingRecord rr; + rr.set_account("CustAccount"); + // rr.set_clearing_firm("004"); + // rr.set_operator_id("NGG"); // SenderID : 48 + rr.set_sender_compid("NGG004"); + rr.set_customer_or_firm(api::orderman::CUSTOMER_OR_FIRM_CUSTOMER); + // rr.set_smp_id("12345678"); + rr.clear_smp_id(); + rr.set_smp_instruction( + api::orderman::SELF_MATCH_PREVENTION_INSTRUCTION_CANCEL_AGRESSING); + rr.set_location("US"); + rr.set_cti_code(api::orderman::CTICode::CTI_CODE_CTI_CODE2); + rr.set_cust_order_handing_inst("H"); + return rr; + } + + CreateOrderMsg createOrderDefault(const api::Security *security = nullptr) { + if (security == nullptr) { + security = &securities().future2; + } + const auto &rr = get_rr(); + return CreateOrderMsg{ + OrderKey{99}, + // Price { 81560 }, + securities().fsettle2, Quantity{120}, security, api::SIDE_BUY, + // Price { 81560 }, + securities().fsettle2, Quantity{120}, + api::orderman::NativeOrderType::NATIVE_ORDER_TYPE_LIMIT, + api::orderman::TIME_IN_FORCE_DAY, + api::orderman::ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO, &rr}; + } + + void incrementKey(CreateOrderMsg &msg) { + msg.key = OrderKey{msg.key.value() + 1}; + } + + void send_order(CreateOrderMsg &order) { + bts_assert(gw.state() == State::READY); + incrementKey(order); + gw.send_order(order); + gw.flush(); + } + + void send_modify(CreateOrderMsg &create, const ExecutionReport *report) { + bts_assert(gw.state() == State::READY); + CancelReplaceOrderMsg msg{ + create, std::get(report->exchange_order_id)}; + gw.send_cancel_replace(msg); + gw.flush(); + } + + void send_cancel(const ExecutionReport *last_report) { + LOG(OrderMan, Error, "sending cancel"); + auto rr = get_rr(); + gw.send_cancel(CancelOrderMsg{ + last_report->order_key, + std::get(last_report->exchange_order_id), + api::orderman::ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO, + last_report->security, &rr, last_report->side}); + } + + void bootup() { + run_until([&]() { return gw.state() == State::READY; }); + LOG(OrderMan, Info, "HIT KEY"); + interactive_delay(); + LOG(OrderMan, Info, "Starting test"); + } + + public: + + void scratch_space() { + bootup(); + } + + void msgw_failover(int step) { + LOG(OrderMan, Info, "WAIT FOR SEQUENCE MSG"); + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + + // Instructions for running this test + // Set the connection function to connect to the primary gw + // ssh -nNT -L 64530:69.50.112.199:64530 bts@10.3.10.16 + // run msg_failover(1) + // After disconnect + // 1) Go to ILinkGW.cpp:500 and change line 500 to replay from message 4 + // instead of 1 + // enqueue_retransmit(4, cme_prev_seq, cme_prev_uuid); + // 2) change this file to run msg_failover(2) + // 3) change the tunnel to use the backup segment 99 ip (I just switch the + // tunnel) + // ssh -nNT -L 64530:69.50.112.205:64530 bts@10.3.10.16 + + if (step == 1) { + auto order = createOrderDefault(); + order.time_in_force = TimeInForce::TIME_IN_FORCE_DAY; + send_order(order); + if (!run_until([&]() { return reports.size() >= 1; })) + return; + order.key = OrderKey{order.key.value() + 1}; + send_order(order); + LOG(OrderMan, Info, "SWITCH TO BACKUP. DELETE SESSION"); + // expect a terminate + run(); + } else { + LOG(OrderMan, Info, "WAIT FOR RETRANSMIT"); + interactive_delay(); + auto order = createOrderDefault(); + order.key = OrderKey{1024}; + send_order(order); + if (!run_until([&]() { return reports.size() >= 1; })) + return; + LOG(OrderMan, Info, "WAIT FOR SEQUENCE MSG"); + interactive_delay(); + gw.send_terminate(); + gw.flush(); + run(); + } + } + + void large_message_gaps() { + // Handles: + // Mid week Connection (Binding without Initialization) for On-Demand + // Format Processing Message Gaps of More than 2500 Messages for On-Demand + // Format Receiving and Processing Multiple Gaps for On-Demand Format + // Bi-Directional Gap Scenario (Sequence Gap Fill) - (Day or FAK/FOK + // orders) for On-Demand Format + // - Bi-Directional has an issue where it fails if you send the orders + // "too fast" + bootup(); + // Send 3 orders qty 425 + auto order = createOrderDefault(); + order.display_quantity = order.quantity = Quantity{1}; + // order.time_in_force = TimeInForce::TIME_IN_FORCE_IOC; + send_order(order); + // interactive_delay(); + send_order(order); + // interactive_delay(); + send_order(order); + // interactive_delay(); + send_order(order); + run(); + } + + void connection_with_gt_orders() { + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + + // Test retransmit + auto order = createOrderDefault(); + order.time_in_force = api::orderman::TimeInForce::TIME_IN_FORCE_GTC; + send_order(order); + + interactive_delay(); + } + + void manage_maximum_quantity_display2() { + LOG(OrderMan, Info, + " Manage Maximum Quantity Display with Cancel-Replace for On-Demand " + "Format "); + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + auto order = createOrderDefault(); + order.quantity = Quantity{6}; + order.display_quantity = Quantity{3}; + send_order(order); + interactive_delay(); + // increase quantity and display quantity by 1 + order.quantity = Quantity{order.quantity.value() + 1}; + order.display_quantity = Quantity{order.display_quantity.value() + 1}; + send_modify(order, reports.back()); + interactive_delay(); + order.display_quantity = Quantity{order.display_quantity.value() - 1}; + send_modify(order, reports.back()); + run(); + } + + void manage_maximum_quantity_display() { + LOG(OrderMan, Info, " Cancel Replace with IFM for On-Demand Format "); + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + auto order = createOrderDefault(); + order.quantity = Quantity{6}; + order.display_quantity = Quantity{3}; + send_order(order); + run(); + } + + void cancel_replace_with_ifm() { + LOG(OrderMan, Info, " Cancel Replace with IFM for On-Demand Format "); + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + auto order = createOrderDefault(); + send_order(order); + // get partial fill + interactive_delay(); + // Increase the qty + order.quantity = order.display_quantity = + Quantity{order.quantity.value() + 1}; + send_modify(order, reports.back()); + interactive_delay(); + order.quantity = order.display_quantity = + Quantity{order.quantity.value() - 2}; + send_modify(order, reports.back()); + run(); + } + + void fak_order_test() { + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + auto order = createOrderDefault(); + order.time_in_force = TimeInForce::TIME_IN_FORCE_IOC; + send_order(order); + if (!run_until([&]() { return reports.size() >= 2; })) + return; + send_order(order); + run(); + } + + void spread_comlete_order_test() { + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + + // send limit order & get ExecutionReportElimination + auto order = createOrderDefault(&securities().spread1); + order.price = securities().spread_settle; + send_order(order); + if (!run_until([&]() { return reports.size() >= 1; })) + return; + interactive_delay(); + // limit order qty 1 + order.quantity = order.display_quantity = Quantity{1}; + send_order(order); + // exe report new, trade spread, trade leg x2 + // trade addendum + LOG(OrderMan, Info, "Wait for trade addendum..."); + interactive_delay(); + // send 4 limit orders qty 1 + for (int x = 0; x < 4; ++x) + gw.send_order(order); + gw.flush(); + + // receive a ton of shit + run(); + } + + // Processing rejects test for on-demand format + void process_rejects() { + interactive_delay(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + + // send a limit day order + auto sec = securities(); + auto order = createOrderDefault(&sec.future2); + send_order(order); + // Get an execution report reject + if (!run_until([&]() { return reports.size() >= 1; })) + return; + // send another limit day order + send_order(order); + // get a business reject + LOG(OrderMan, Info, "Press a key after receiving a business reject"); + interactive_delay(); + gw.send_sequence(); + send_order(order); + LOG(OrderMan, Info, + "Press a key after receiving a execution report *or* not applied"); + interactive_delay(); + send_order(order); + reports.clear(); + if (!run_until([&]() { return reports.size() >= 1; })) + return; + send_cancel(reports.back()); + // get a cancel reject + LOG(OrderMan, Info, "Press a key after receiving a cancel reject"); + interactive_delay(); + send_order(order); + if (!run_until([&]() { return reports.size() >= 2; })) + return; + order.quantity = Quantity{order.quantity.value() + 1}; + send_modify(order, reports.back()); + run(); + } + + void multiple_cancel_replace_for_on_demand_format() { + bootup(); + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + // send limit day order + auto sec = securities(); + auto security = sec.future2; + auto order = createOrderDefault(&security); + order.time_in_force = TimeInForce::TIME_IN_FORCE_DAY; + send_order(order); + // get exe report new + if (!run_until([&]() { return reports.size() >= 1; })) + return; + // send cancel/replace - change quantity + order.quantity = Quantity{order.quantity.value() + 1}; + send_modify(order, reports.back()); + if (!run_until([&]() { return reports.size() >= 2; })) + return; + // send cancel/replace - change price + order.price = Price{order.price.value() + 10}; + send_modify(order, reports.back()); + if (!run_until([&]() { return reports.size() >= 3; })) + return; + // exe report + // send cancel/replace - change price&quantity + order.price = Price{order.price.value() + 10}; + order.quantity = Quantity{order.quantity.value() + 1}; + send_modify(order, reports.back()); + // exe report + // fill + run(); + } + + // Managed GTC/GTD order lifetime for on-demand format + void send_order_test() { + bootup(); + + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + run_until([&]() { return gw.state() == State::READY; }); + + // send an order + auto sec = securities(); + auto security = sec.future2; + auto order = createOrderDefault(&security); + order.time_in_force = TimeInForce::TIME_IN_FORCE_GTC; + send_order(order); + + // Get a confirm and trade + auto ok = run_until([&]() { return reports.size() >= 2; }); + if (!ok) { + return; + } + + // Wait 5 seconds so the cme can breathe + run(5); + + order.time_in_force = TimeInForce::TIME_IN_FORCE_DATE; + send_order(order); + + run(); + } + + // Market-Limit Order test fr On-Demand format + // Market Order test fr On-Demand format + void order_and_cancel_test() { + interactive_delay(); + LOG(OrderMan, Info, "Starting test"); + + using namespace orderman; + std::vector reports; + gw.subscribe_execution_reports( + [&](const ExecutionReport *r) { reports.push_back(r); }); + + // send an order + auto order = createOrderDefault(); + order.order_type = NATIVE_ORDER_TYPE_MARKET; + send_order(order); + + // Get a confirm and trade + auto ok = run_until([&]() { return reports.size() >= 2; }); + if (!ok) { + LOG(OrderMan, Error, "Error encountered waiting for reports."); + return; + } + + // Wait 10 seconds so the cme can breathe + run(10); + + LOG(OrderMan, Error, "sending cancel"); + auto rr = get_rr(); + if (!reports.empty()) { + auto last_report = reports.back(); + gw.send_cancel(CancelOrderMsg{ + last_report->order_key, + std::get(last_report->exchange_order_id), + api::orderman::ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO, + last_report->security, &rr, last_report->side}); + } + // run_until([&]() { return reports.size() >= 3; }); + run(); + } + + void semi_automated() { + interactive_delay(); + auto order = createOrderDefault(); + order.manual_order_indicator = + api::orderman::ManualOrderIndicator::MANUAL_ORDER_INDICATOR_YES; + send_order(order); + interactive_delay(); + order.manual_order_indicator = + api::orderman::ManualOrderIndicator::MANUAL_ORDER_INDICATOR_NO; + send_order(order); + run(); + } + + void primary_gateway_enforcement() { + // success! + run(30); + run(30); + gw.send_terminate(); + gw.flush(); + } +}; + +int CMECert::execute(const std::vector &) { + // Typically a timestamp + SessionSaver ss; + ss.load(); + Config config{"NGG", "004", false, [](auto,auto,auto) {} }; + IL3Reactor reactor; + IL3MessageFramer framer; + auto &connection = reactor.register_connection( + {// local dev tunnel + TCPEndpoint{"127.0.0.1", 64530}, TCPEndpoint{"127.0.0.1", 64531}, + // Direct connection + TCPEndpoint{"69.50.112.199", 64530}, + TCPEndpoint{"69.50.12.205", 64530}}); + + // NGG primary - 69.50.112.199 64530 + // NGG backup - 69.50.112.205 64530 + + IL3GW gw(connection, framer, nullptr, ss.current, config,{}); + gw.subscribe_session([&](auto &s) { ss.session_changed(s); }); + gw.connect(); + + TestRunner run(reactor, gw); + + /////////////////////////// + // + // The current test + // + /////////////////////////// + + run.scratch_space(); + + /////////////////////////// + + for (auto x = 0; x < 5; ++x) { + reactor.do_work(); + sleep(1); + } + gw.send_terminate(); + gw.flush(); + return 0; +} + +std::string CMECert::help() { return "Tool to drive CME Cert"; } + +} // namespace cmd +} // namespace bts diff --git a/src/server/sparkd/cmds/CMECertCmd.h b/src/server/sparkd/cmds/CMECertCmd.h new file mode 100644 index 000000000..0a034f592 --- /dev/null +++ b/src/server/sparkd/cmds/CMECertCmd.h @@ -0,0 +1,16 @@ +#pragma once + +#include "ICmd.h" + +namespace bts { +namespace cmd { + +class CMECert : public ICmd +{ +public: + int execute(std::vector const &args); + std::string help (); +}; + +}} + diff --git a/src/server/sparkd/cmds/CmdRegistry.cpp b/src/server/sparkd/cmds/CmdRegistry.cpp old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/CmdRegistry.h b/src/server/sparkd/cmds/CmdRegistry.h old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/Help.cpp b/src/server/sparkd/cmds/Help.cpp old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/Help.h b/src/server/sparkd/cmds/Help.h old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/ICmd.h b/src/server/sparkd/cmds/ICmd.h old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/Test.cpp b/src/server/sparkd/cmds/Test.cpp old mode 100755 new mode 100644 diff --git a/src/server/sparkd/cmds/Test.h b/src/server/sparkd/cmds/Test.h old mode 100755 new mode 100644 diff --git a/src/server/sparkd/main.cpp b/src/server/sparkd/main.cpp index d8c2dcaf4..75cd7ff80 100644 --- a/src/server/sparkd/main.cpp +++ b/src/server/sparkd/main.cpp @@ -20,6 +20,7 @@ #include "server/sparkd/cmds/Span.h" #include "server/sparkd/cmds/Test.h" #include "server/sparkd/cmds/Web.h" +#include "server/sparkd/cmds/CMECertCmd.h" using namespace bts; @@ -43,6 +44,7 @@ int main(int argc, char **argv) { REGISTER(ParseHistoricalFIX); REGISTER(PrintHedgeOrders); REGISTER(AdminReport); + REGISTER(CMECert); END_CMD; utils::finit_spark_lib(); diff --git a/src/server/sparkd/position/PositionAggregator.cpp b/src/server/sparkd/position/PositionAggregator.cpp index af18e4417..c310e540d 100644 --- a/src/server/sparkd/position/PositionAggregator.cpp +++ b/src/server/sparkd/position/PositionAggregator.cpp @@ -8,6 +8,7 @@ #include "lib/orderman/orderman_utils/orderman_utils.h" #include "lib/utils/TimeStamp.h" #include "lib/utils/Dispatcher.h" +#include "lib/md/MDClient.h" #include #include @@ -24,7 +25,7 @@ PositionAggregator::PositionAggregator(api::position::PositionService&& pos, md: _position_map(), _pnl_map(), _accounts(), - _oracle(mdclient), + _oracle(mdclient.oracle()), _lock() { _position_service.subscribe_position_data() | diff --git a/src/web/CMakeDeps.cmake b/src/web/CMakeDeps.cmake index 81ff120a3..113f18983 100644 --- a/src/web/CMakeDeps.cmake +++ b/src/web/CMakeDeps.cmake @@ -1 +1 @@ -set(sources ../../externals/linux/include/google/protobuf/descriptor.proto;../../externals/linux/include/google/protobuf/timestamp.proto;../lib/api/apicore.proto;../lib/api/apigateway.proto;../lib/api/apioptions.proto;../lib/api/services/AdminService.proto;../lib/api/services/AlgoDefinitionService.proto;../lib/api/services/AlgoService.proto;../lib/api/services/ApiUnitTestService.proto;../lib/api/services/AuthService.proto;../lib/api/services/BasePositionService.proto;../lib/api/services/ErrorReportService.proto;../lib/api/services/HelloService.proto;../lib/api/services/MBOService.proto;../lib/api/services/MarginService.proto;../lib/api/services/MarketDataAuxiliaryService.proto;../lib/api/services/MarketDataRelay.proto;../lib/api/services/MarketDataService.proto;../lib/api/services/MoneyFileService.proto;../lib/api/services/OrderService.proto;../lib/api/services/OutOfProcessURLListener.proto;../lib/api/services/PersistenceService.proto;../lib/api/services/PositionService.proto;../lib/api/services/ShellDiagnosticService.proto;../lib/api/services/ShellLatencyService.proto;../lib/api/services/SyntheticSecurityService.proto;../lib/domain_model/Security.proto;../lib/md/protos/co2.proto;../lib/sparkproto/SparkProtos.proto;api/build.sh;api/quiet_build.sh;api/src/DynamicService.ts;api/src/ServiceContext.ts;api/src/bts_assert.ts;ui/src/Access.fs;ui/src/Accounts/ClipLimits.fs;ui/src/Accounts/ProductLimits.fs;ui/src/Accounts/SecurityLimits.fs;ui/src/Accounts/State.fs;ui/src/Accounts/Types.fs;ui/src/Accounts/View.fs;ui/src/App.fs;ui/src/Cmd.fs;ui/src/Controls/Button.fs;ui/src/Controls/DataGrid.fs;ui/src/Controls/Fields.fs;ui/src/Controls/Modal.fs;ui/src/Controls/ReactGrid.fs;ui/src/Controls/Table.fs;ui/src/Controls/nbsp.fs;ui/src/Global.fs;ui/src/Imports.fs;ui/src/Lens.fs;ui/src/Login/Login.fs;ui/src/Nav.fs;ui/src/State.fs;ui/src/Types.fs;ui/src/Users/State.fs;ui/src/Users/Types.fs;ui/src/Users/View.fs;ui/src/Util/EnumUtils.fs;ui/src/Util/JSMap.fs;ui/src/Util/StreamUtils.fs;ui/src/obj/Debug/netstandard2.0/ui.AssemblyInfo.fs) \ No newline at end of file +set(sources ../../externals/linux/include/google/protobuf/descriptor.proto;../../externals/linux/include/google/protobuf/timestamp.proto;../lib/api/apicore.proto;../lib/api/apigateway.proto;../lib/api/apioptions.proto;../lib/api/services/AdminService.proto;../lib/api/services/AlgoDefinitionService.proto;../lib/api/services/AlgoService.proto;../lib/api/services/ApiUnitTestService.proto;../lib/api/services/AuthService.proto;../lib/api/services/BasePositionService.proto;../lib/api/services/ErrorReportService.proto;../lib/api/services/HelloService.proto;../lib/api/services/MBOService.proto;../lib/api/services/MarginService.proto;../lib/api/services/MarketDataAuxiliaryService.proto;../lib/api/services/MarketDataRelay.proto;../lib/api/services/MarketDataService.proto;../lib/api/services/MoneyFileService.proto;../lib/api/services/OrderService.proto;../lib/api/services/OutOfProcessURLListener.proto;../lib/api/services/PersistenceService.proto;../lib/api/services/PositionService.proto;../lib/api/services/ShellDiagnosticService.proto;../lib/api/services/ShellLatencyService.proto;../lib/api/services/SyntheticSecurityService.proto;../lib/domain_model/Security.proto;../lib/md/protos/co2.proto;../lib/sparkproto/SparkProtos.proto;api/build.sh;api/quiet_build.sh;api/src/DynamicService.ts;api/src/ServiceContext.ts;api/src/bts_assert.ts;ui/src/Access.fs;ui/src/Accounts/ClipLimits.fs;ui/src/Accounts/ProductLimits.fs;ui/src/Accounts/SecurityLimits.fs;ui/src/Accounts/State.fs;ui/src/Accounts/Types.fs;ui/src/Accounts/View.fs;ui/src/App.fs;ui/src/Cmd.fs;ui/src/Controls/Button.fs;ui/src/Controls/DataGrid.fs;ui/src/Controls/Fields.fs;ui/src/Controls/Modal.fs;ui/src/Controls/ReactGrid.fs;ui/src/Controls/Table.fs;ui/src/Controls/nbsp.fs;ui/src/Global.fs;ui/src/Imports.fs;ui/src/Lens.fs;ui/src/Login/Login.fs;ui/src/Nav.fs;ui/src/State.fs;ui/src/Types.fs;ui/src/Users/State.fs;ui/src/Users/Types.fs;ui/src/Users/View.fs;ui/src/Util/EnumUtils.fs;ui/src/Util/JSMap.fs;ui/src/Util/StreamUtils.fs) \ No newline at end of file diff --git a/src/web/api/build.sh b/src/web/api/build.sh index 669d17006..be6fdd651 100755 --- a/src/web/api/build.sh +++ b/src/web/api/build.sh @@ -2,6 +2,10 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export PATH="$PATH:/root/.dotnet/tools" +if grep -iq microsoft /proc/sys/kernel/osrelease; then + exit 0 +fi + export OUT=${BUILD_DIR:-../../../build}/web MODE=manual case "$OUT" in diff --git a/testing/manual/orders/order_entry.txt b/testing/manual/orders/order_entry.txt new file mode 100644 index 000000000..c90e0c651 --- /dev/null +++ b/testing/manual/orders/order_entry.txt @@ -0,0 +1,44 @@ +* Basic limit order +- Enter a limit order, verify its price and quantity in the order book +- Modify it, verify the quantity and price change as you change them +- Cancel it, verify it shows as canceled in the order book +* Fills +** Full fills +- Enter a limit order that you know fill be filled either on entry or by an aggressor +- Verify that you received a fill and the order is marked as completed +- Verify that the average filled price is correct and the quantity is correct +** Partial fills +- Enter a limit order that you can cause to be partially filled either on entry or by an aggressor +- Verify the partial fill causes the filled quantity to update and that you have a correct average price +- Cause the order to be completely filled and verify its updated correctly +* Spreads +- Enter a spread trade +- Modify its price and quantity, verify they are modified +- Cause to be filled +- Verify you get both the leg fills and the spread fill marked as such +- Verify the quantities and prices of both kinds of fills are correct +* Exotic order types +** Enter, change and cancel each of the following: +- Market order +- Stop Order +- Stop Limit Order +- Iceberg order +* GTC orders +- Enter a GTC order +- Shutdown the server +- Using another server cause the order to be partially filled +- Start the original server and verify that you receive the partial fills +- Verify that you can change and cancel the recovered order +* Disaster Recovery +- Enter some orders, get some fills +- Enter a GTC order +- Shutdown the server +- Remove the orders and fills databases +- Change the CME sequence number in the sequence number file to 1 +- Restart the server +- Verify that the orders are recreated as well as the fills +- Verify you can update and cancel the GTC order +* Multiple accounts +- Enter an order via one account, observe that the fills for that order go into the right place +- Repeat on a second account, check the same + diff --git a/tools/docker_tools/build_spark b/tools/docker_tools/build_spark index 27a026e68..a83dc81d1 100755 --- a/tools/docker_tools/build_spark +++ b/tools/docker_tools/build_spark @@ -12,7 +12,7 @@ case "$1" in BUILD_TYPE=ninja_release ;; *) - BUILD_TYPE=clang_debug + BUILD_TYPE=ninja_debug ;; esac BUILD_CMD="ninja -C $BUILD_ROOT/$BUILD_TYPE" diff --git a/tools/watch_spark.sh b/tools/watch_spark.sh new file mode 100755 index 000000000..d6405b028 --- /dev/null +++ b/tools/watch_spark.sh @@ -0,0 +1,5 @@ +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SRC_ROOT=$DIR/../ +FIELDS=${1:-"3,4,8,10"} +tail -f ~/sparkdata/data/logging/log | cut -d'|' -f $FIELDS