Merged
This commit is contained in:
commit
ccca656b88
113 files changed
+133514
-48
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#include "IVenueObserver.h"
|
||||
namespace bts {
|
||||
namespace orderman_v2 {
|
||||
struct SilentVenueObserver : public IVenueObserver {
|
||||
void on_venue_login_success(std::vector<ExecReport> const &) override { }
|
||||
void on_venue_login_failure() override { }
|
||||
void on_venue_disconnect() override { }
|
||||
void on_venue_exe_report(const ExecReport &) override { }
|
||||
void on_venue_error(VenueError const &) override { }
|
||||
};
|
||||
IVenueObserver& default_venue_observer() {
|
||||
static SilentVenueObserver svo;
|
||||
return svo;
|
||||
}
|
||||
}}
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "lib/orderman_v2/common.h" // OrderKey
|
||||
|
||||
namespace bts {
|
||||
namespace orderman_v2 {
|
||||
@@ -36,5 +37,7 @@ class IVenueObserver {
|
||||
virtual void on_venue_error(VenueError const &) = 0;
|
||||
};
|
||||
|
||||
IVenueObserver& default_venue_observer();
|
||||
|
||||
} // namespace orderman_v2
|
||||
} // namespace bts
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class AvgPxInd
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, AvgPxInd::Value m)
|
||||
{
|
||||
return os << AvgPxInd::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class BooleanFlag
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, BooleanFlag::Value m)
|
||||
{
|
||||
return os << BooleanFlag::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class BooleanNULL
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, BooleanNULL::Value m)
|
||||
{
|
||||
return os << BooleanNULL::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ClearingAcctType
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ClearingAcctType::Value m)
|
||||
{
|
||||
return os << ClearingAcctType::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CmtaGiveUpCD
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, CmtaGiveUpCD::Value m)
|
||||
{
|
||||
return os << CmtaGiveUpCD::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,150 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CustOrdHandlInst
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, CustOrdHandlInst::Value m)
|
||||
{
|
||||
return os << CustOrdHandlInst::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,144 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class CustOrderCapacity
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, CustOrderCapacity::Value m)
|
||||
{
|
||||
return os << CustOrderCapacity::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,343 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, DATA writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("length": )";
|
||||
builder << +writer.length();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,156 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class DKReason
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, DKReason::Value m)
|
||||
{
|
||||
return os << DKReason::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,361 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, Decimal32NULL writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
builder << +writer.mantissa();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("exponent": )";
|
||||
builder << +writer.exponent();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,361 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, Decimal64NULL writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
builder << +writer.mantissa();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("exponent": )";
|
||||
builder << +writer.exponent();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,992 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * ReasonMetaAttribute(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 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<size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
EstablishmentReject505 &putReason(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48);
|
||||
return *this;
|
||||
}
|
||||
|
||||
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 (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 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::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 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::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 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::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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, EstablishmentReject505 _writer)
|
||||
{
|
||||
EstablishmentReject505 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecAckStatus
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ExecAckStatus::Value m)
|
||||
{
|
||||
return os << ExecAckStatus::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,515 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
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<std::uint8_t>(bits | (1u << 0u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 0u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 1u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 1u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 2u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 2u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 3u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 3u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 4u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 4u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 5u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 5u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 6u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 6u)) : static_cast<std::uint8_t>((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<std::uint8_t>(bits | (1u << 7u)) : static_cast<std::uint8_t>(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<std::uint8_t>((bits) | (1u << 7u)) : static_cast<std::uint8_t>((bits) & ~(1u << 7u)));
|
||||
std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecMode
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ExecMode::Value m)
|
||||
{
|
||||
return os << ExecMode::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,159 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecReason
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ExecReason::Value m)
|
||||
{
|
||||
return os << ExecReason::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExecTypTrdCxl
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ExecTypTrdCxl::Value m)
|
||||
{
|
||||
return os << ExecTypTrdCxl::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+4297
File diff suppressed because it is too large.
Load diff
+5304
File diff suppressed because it is too large.
Load diff
+3923
File diff suppressed because it is too large.
Load diff
+5361
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+4243
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ExpCycle
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ExpCycle::Value m)
|
||||
{
|
||||
return os << ExpCycle::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class FTI
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, FTI::Value m)
|
||||
{
|
||||
return os << FTI::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,361 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, GroupSize writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("blockLength": )";
|
||||
builder << +writer.blockLength();
|
||||
|
||||
builder << ", ";
|
||||
builder << R"("numInGroup": )";
|
||||
builder << +writer.numInGroup();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class KeepAliveLapsed
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, KeepAliveLapsed::Value m)
|
||||
{
|
||||
return os << KeepAliveLapsed::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ListUpdAct
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ListUpdAct::Value m)
|
||||
{
|
||||
return os << ListUpdAct::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ManualOrdInd
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ManualOrdInd::Value m)
|
||||
{
|
||||
return os << ManualOrdInd::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class ManualOrdIndReq
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ManualOrdIndReq::Value m)
|
||||
{
|
||||
return os << ManualOrdIndReq::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionOrdTyp
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionOrdTyp::Value m)
|
||||
{
|
||||
return os << MassActionOrdTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionResponse
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionResponse::Value m)
|
||||
{
|
||||
return os << MassActionResponse::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassActionScope
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassActionScope::Value m)
|
||||
{
|
||||
return os << MassActionScope::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassCancelTIF
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassCancelTIF::Value m)
|
||||
{
|
||||
return os << MassCancelTIF::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassCxlReqTyp
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassCxlReqTyp::Value m)
|
||||
{
|
||||
return os << MassCxlReqTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassStatusOrdTyp
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassStatusOrdTyp::Value m)
|
||||
{
|
||||
return os << MassStatusOrdTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassStatusReqTyp
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassStatusReqTyp::Value m)
|
||||
{
|
||||
return os << MassStatusReqTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class MassStatusTIF
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, MassStatusTIF::Value m)
|
||||
{
|
||||
return os << MassStatusTIF::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,507 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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
|
||||
@@ -0,0 +1,507 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,914 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * ReasonMetaAttribute(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 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<size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
NegotiationReject502 &putReason(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48);
|
||||
return *this;
|
||||
}
|
||||
|
||||
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 (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 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::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 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::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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, NegotiationReject502 _writer)
|
||||
{
|
||||
NegotiationReject502 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,637 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * 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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, NotApplied513 _writer)
|
||||
{
|
||||
NotApplied513 writer(_writer.m_buffer, _writer.m_offset,
|
||||
_writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class OFMOverrideReq
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OFMOverrideReq::Value m)
|
||||
{
|
||||
return os << OFMOverrideReq::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class OrdStatusTrd
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrdStatusTrd::Value m)
|
||||
{
|
||||
return os << OrdStatusTrd::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class OrdStatusTrdCxl
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrdStatusTrdCxl::Value m)
|
||||
{
|
||||
return os << OrdStatusTrdCxl::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class OrderEventType
|
||||
{
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrderEventType::Value m)
|
||||
{
|
||||
return os << OrderEventType::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,156 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrderStatus::Value m)
|
||||
{
|
||||
return os << OrderStatus::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,144 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrderType::Value m)
|
||||
{
|
||||
return os << OrderType::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, OrderTypeReq::Value m)
|
||||
{
|
||||
return os << OrderTypeReq::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,348 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "required";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "constant";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, PRICE9 writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
builder << +writer.mantissa();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,348 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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)2;
|
||||
}
|
||||
|
||||
SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
|
||||
{
|
||||
switch (metaAttribute)
|
||||
{
|
||||
case MetaAttribute::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "optional";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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::EPOCH: return "";
|
||||
case MetaAttribute::TIME_UNIT: return "";
|
||||
case MetaAttribute::SEMANTIC_TYPE: return "";
|
||||
case MetaAttribute::PRESENCE: return "constant";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& builder, PRICENULL9 writer)
|
||||
{
|
||||
builder << '{';
|
||||
builder << R"("mantissa": )";
|
||||
builder << +writer.mantissa();
|
||||
|
||||
builder << '}';
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, PartyDetailRole::Value m)
|
||||
{
|
||||
return os << PartyDetailRole::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+2772
File diff suppressed because it is too large.
Load diff
+3132
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, QuoteAckStatus::Value m)
|
||||
{
|
||||
return os << QuoteAckStatus::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,147 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, QuoteCxlStatus::Value m)
|
||||
{
|
||||
return os << QuoteCxlStatus::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,144 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, QuoteCxlTyp::Value m)
|
||||
{
|
||||
return os << QuoteCxlTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,135 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, QuoteTyp::Value m)
|
||||
{
|
||||
return os << QuoteTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
To re-generate these templates download
|
||||
https://github.com/real-logic/simple-binary-encoding 20c0369b9593e0a0c89394feada3cab19a36c38e
|
||||
Follow the c++ build instructions to build using cmake.
|
||||
See gocode/sbe-tool script for how to actually run the tool on a new schema. Change sbe.target.language to cpp and run with -s ilinkbinary.xml
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, RFQSide::Value m)
|
||||
{
|
||||
return os << RFQSide::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,144 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, ReqResult::Value m)
|
||||
{
|
||||
return os << ReqResult::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,793 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * 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 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::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 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::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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,929 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * ReasonMetaAttribute(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 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<size_t>(length));
|
||||
return length;
|
||||
}
|
||||
|
||||
RetransmitReject510 &putReason(const char *const src) SBE_NOEXCEPT
|
||||
{
|
||||
std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48);
|
||||
return *this;
|
||||
}
|
||||
|
||||
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 (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 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::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 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::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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,730 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::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 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)2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 * 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 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::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 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::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 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::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 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::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 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, SLEDS::Value m)
|
||||
{
|
||||
return os << SLEDS::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, SMPI::Value m)
|
||||
{
|
||||
return os << SMPI::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,141 @@
|
||||
/* 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<double>::quiet_NaN() */
|
||||
# include <cmath>
|
||||
# define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
|
||||
# define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
|
||||
#else
|
||||
/* math.h needed for NAN */
|
||||
# include <math.h>
|
||||
# define SBE_FLOAT_NAN NAN
|
||||
# define SBE_DOUBLE_NAN NAN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# include <cstdint>
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
#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 <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
|
||||
# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
|
||||
# define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
|
||||
#else
|
||||
# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
|
||||
#endif
|
||||
|
||||
#if defined(SBE_NO_BOUNDS_CHECK)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
|
||||
#elif defined(_MSC_VER)
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
|
||||
#else
|
||||
# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
|
||||
#endif
|
||||
|
||||
#define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
|
||||
#define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
|
||||
#define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
|
||||
#define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
|
||||
#define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
|
||||
#define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
|
||||
|
||||
|
||||
namespace iLinkBinary {
|
||||
|
||||
class 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<typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits>& operator<<(
|
||||
std::basic_ostream<CharT, Traits>& os, SecRspTyp::Value m)
|
||||
{
|
||||
return os << SecRspTyp::c_str(m);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user