1359 lines
53 KiB
C++
1359 lines
53 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// NO CHECKED-IN PROTOBUF GENCODE
|
|
// source: trading.proto
|
|
// Protobuf C++ Version: 5.29.2
|
|
|
|
#include "trading.pb.h"
|
|
|
|
#include <algorithm>
|
|
#include <type_traits>
|
|
#include "google/protobuf/io/coded_stream.h"
|
|
#include "google/protobuf/generated_message_tctable_impl.h"
|
|
#include "google/protobuf/extension_set.h"
|
|
#include "google/protobuf/generated_message_util.h"
|
|
#include "google/protobuf/wire_format_lite.h"
|
|
#include "google/protobuf/descriptor.h"
|
|
#include "google/protobuf/generated_message_reflection.h"
|
|
#include "google/protobuf/reflection_ops.h"
|
|
#include "google/protobuf/wire_format.h"
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
// Must be included last.
|
|
#include "google/protobuf/port_def.inc"
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
namespace _pb = ::google::protobuf;
|
|
namespace _pbi = ::google::protobuf::internal;
|
|
namespace _fl = ::google::protobuf::internal::field_layout;
|
|
namespace trading {
|
|
|
|
inline constexpr OrderAck::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: message_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
success_{false},
|
|
_cached_size_{0} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR OrderAck::OrderAck(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct OrderAckDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR OrderAckDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~OrderAckDefaultTypeInternal() {}
|
|
union {
|
|
OrderAck _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OrderAckDefaultTypeInternal _OrderAck_default_instance_;
|
|
|
|
inline constexpr Order::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: symbol_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
price_{0},
|
|
quantity_{0},
|
|
side_{static_cast< ::trading::Side >(0)},
|
|
_cached_size_{0} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR Order::Order(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct OrderDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR OrderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~OrderDefaultTypeInternal() {}
|
|
union {
|
|
Order _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OrderDefaultTypeInternal _Order_default_instance_;
|
|
|
|
inline constexpr MarketRequest::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: symbol_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
_cached_size_{0} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR MarketRequest::MarketRequest(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct MarketRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR MarketRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~MarketRequestDefaultTypeInternal() {}
|
|
union {
|
|
MarketRequest _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MarketRequestDefaultTypeInternal _MarketRequest_default_instance_;
|
|
|
|
inline constexpr MarketData::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: symbol_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
price_{0},
|
|
timestamp_{::int64_t{0}},
|
|
_cached_size_{0} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR MarketData::MarketData(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct MarketDataDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR MarketDataDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~MarketDataDefaultTypeInternal() {}
|
|
union {
|
|
MarketData _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MarketDataDefaultTypeInternal _MarketData_default_instance_;
|
|
} // namespace trading
|
|
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_trading_2eproto[1];
|
|
static constexpr const ::_pb::ServiceDescriptor**
|
|
file_level_service_descriptors_trading_2eproto = nullptr;
|
|
const ::uint32_t
|
|
TableStruct_trading_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
|
|
protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::trading::Order, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::trading::Order, _impl_.symbol_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::Order, _impl_.quantity_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::Order, _impl_.price_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::Order, _impl_.side_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::trading::OrderAck, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::trading::OrderAck, _impl_.success_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::OrderAck, _impl_.message_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketRequest, _impl_.symbol_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketData, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketData, _impl_.symbol_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketData, _impl_.price_),
|
|
PROTOBUF_FIELD_OFFSET(::trading::MarketData, _impl_.timestamp_),
|
|
};
|
|
|
|
static const ::_pbi::MigrationSchema
|
|
schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
{0, -1, -1, sizeof(::trading::Order)},
|
|
{12, -1, -1, sizeof(::trading::OrderAck)},
|
|
{22, -1, -1, sizeof(::trading::MarketRequest)},
|
|
{31, -1, -1, sizeof(::trading::MarketData)},
|
|
};
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::trading::_Order_default_instance_._instance,
|
|
&::trading::_OrderAck_default_instance_._instance,
|
|
&::trading::_MarketRequest_default_instance_._instance,
|
|
&::trading::_MarketData_default_instance_._instance,
|
|
};
|
|
const char descriptor_table_protodef_trading_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
|
|
protodesc_cold) = {
|
|
"\n\rtrading.proto\022\007trading\"U\n\005Order\022\016\n\006sym"
|
|
"bol\030\001 \001(\t\022\020\n\010quantity\030\002 \001(\005\022\r\n\005price\030\003 \001"
|
|
"(\001\022\033\n\004side\030\004 \001(\0162\r.trading.Side\",\n\010Order"
|
|
"Ack\022\017\n\007success\030\001 \001(\010\022\017\n\007message\030\002 \001(\t\"\037\n"
|
|
"\rMarketRequest\022\016\n\006symbol\030\001 \001(\t\">\n\nMarket"
|
|
"Data\022\016\n\006symbol\030\001 \001(\t\022\r\n\005price\030\002 \001(\001\022\021\n\tt"
|
|
"imestamp\030\003 \001(\003*/\n\004Side\022\024\n\020SIDE_UNSPECIFI"
|
|
"ED\020\000\022\007\n\003BUY\020\001\022\010\n\004SELL\020\0022\203\001\n\016TradingServi"
|
|
"ce\022.\n\tSendOrder\022\016.trading.Order\032\021.tradin"
|
|
"g.OrderAck\022A\n\020StreamMarketData\022\026.trading"
|
|
".MarketRequest\032\023.trading.MarketData0\001b\006p"
|
|
"roto3"
|
|
};
|
|
static ::absl::once_flag descriptor_table_trading_2eproto_once;
|
|
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_trading_2eproto = {
|
|
false,
|
|
false,
|
|
445,
|
|
descriptor_table_protodef_trading_2eproto,
|
|
"trading.proto",
|
|
&descriptor_table_trading_2eproto_once,
|
|
nullptr,
|
|
0,
|
|
4,
|
|
schemas,
|
|
file_default_instances,
|
|
TableStruct_trading_2eproto::offsets,
|
|
file_level_enum_descriptors_trading_2eproto,
|
|
file_level_service_descriptors_trading_2eproto,
|
|
};
|
|
namespace trading {
|
|
const ::google::protobuf::EnumDescriptor* Side_descriptor() {
|
|
::google::protobuf::internal::AssignDescriptors(&descriptor_table_trading_2eproto);
|
|
return file_level_enum_descriptors_trading_2eproto[0];
|
|
}
|
|
PROTOBUF_CONSTINIT const uint32_t Side_internal_data_[] = {
|
|
196608u, 0u, };
|
|
bool Side_IsValid(int value) {
|
|
return 0 <= value && value <= 2;
|
|
}
|
|
// ===================================================================
|
|
|
|
class Order::_Internal {
|
|
public:
|
|
};
|
|
|
|
Order::Order(::google::protobuf::Arena* arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:trading.Order)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Order::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from, const ::trading::Order& from_msg)
|
|
: symbol_(arena, from.symbol_),
|
|
_cached_size_{0} {}
|
|
|
|
Order::Order(
|
|
::google::protobuf::Arena* arena,
|
|
const Order& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
Order* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
::memcpy(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, price_),
|
|
reinterpret_cast<const char *>(&from._impl_) +
|
|
offsetof(Impl_, price_),
|
|
offsetof(Impl_, side_) -
|
|
offsetof(Impl_, price_) +
|
|
sizeof(Impl_::side_));
|
|
|
|
// @@protoc_insertion_point(copy_constructor:trading.Order)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Order::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: symbol_(arena),
|
|
_cached_size_{0} {}
|
|
|
|
inline void Order::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
::memset(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, price_),
|
|
0,
|
|
offsetof(Impl_, side_) -
|
|
offsetof(Impl_, price_) +
|
|
sizeof(Impl_::side_));
|
|
}
|
|
Order::~Order() {
|
|
// @@protoc_insertion_point(destructor:trading.Order)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void Order::SharedDtor(MessageLite& self) {
|
|
Order& this_ = static_cast<Order&>(self);
|
|
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.symbol_.Destroy();
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* Order::PlacementNew_(const void*, void* mem,
|
|
::google::protobuf::Arena* arena) {
|
|
return ::new (mem) Order(arena);
|
|
}
|
|
constexpr auto Order::InternalNewImpl_() {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Order),
|
|
alignof(Order));
|
|
}
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataFull Order::_class_data_ = {
|
|
::google::protobuf::internal::ClassData{
|
|
&_Order_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&Order::MergeImpl,
|
|
::google::protobuf::Message::GetNewImpl<Order>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&Order::SharedDtor,
|
|
::google::protobuf::Message::GetClearImpl<Order>(), &Order::ByteSizeLong,
|
|
&Order::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(Order, _impl_._cached_size_),
|
|
false,
|
|
},
|
|
&Order::kDescriptorMethods,
|
|
&descriptor_table_trading_2eproto,
|
|
nullptr, // tracker
|
|
};
|
|
const ::google::protobuf::internal::ClassData* Order::GetClassData() const {
|
|
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
|
|
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
|
|
return _class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<2, 4, 0, 28, 2> Order::_table_ = {
|
|
{
|
|
0, // no _has_bits_
|
|
0, // no _extensions_
|
|
4, 24, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967280, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
4, // num_field_entries
|
|
0, // num_aux_entries
|
|
offsetof(decltype(_table_), field_names), // no aux_entries
|
|
_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::trading::Order>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
// .trading.Side side = 4;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Order, _impl_.side_), 63>(),
|
|
{32, 63, 0, PROTOBUF_FIELD_OFFSET(Order, _impl_.side_)}},
|
|
// string symbol = 1;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{10, 63, 0, PROTOBUF_FIELD_OFFSET(Order, _impl_.symbol_)}},
|
|
// int32 quantity = 2;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Order, _impl_.quantity_), 63>(),
|
|
{16, 63, 0, PROTOBUF_FIELD_OFFSET(Order, _impl_.quantity_)}},
|
|
// double price = 3;
|
|
{::_pbi::TcParser::FastF64S1,
|
|
{25, 63, 0, PROTOBUF_FIELD_OFFSET(Order, _impl_.price_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// string symbol = 1;
|
|
{PROTOBUF_FIELD_OFFSET(Order, _impl_.symbol_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// int32 quantity = 2;
|
|
{PROTOBUF_FIELD_OFFSET(Order, _impl_.quantity_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
|
// double price = 3;
|
|
{PROTOBUF_FIELD_OFFSET(Order, _impl_.price_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kDouble)},
|
|
// .trading.Side side = 4;
|
|
{PROTOBUF_FIELD_OFFSET(Order, _impl_.side_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
|
|
}},
|
|
// no aux_entries
|
|
{{
|
|
"\15\6\0\0\0\0\0\0"
|
|
"trading.Order"
|
|
"symbol"
|
|
}},
|
|
};
|
|
|
|
PROTOBUF_NOINLINE void Order::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:trading.Order)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.symbol_.ClearToEmpty();
|
|
::memset(&_impl_.price_, 0, static_cast<::size_t>(
|
|
reinterpret_cast<char*>(&_impl_.side_) -
|
|
reinterpret_cast<char*>(&_impl_.price_)) + sizeof(_impl_.side_));
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* Order::_InternalSerialize(
|
|
const MessageLite& base, ::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) {
|
|
const Order& this_ = static_cast<const Order&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* Order::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
const Order& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(serialize_to_array_start:trading.Order)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
const std::string& _s = this_._internal_symbol();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "trading.Order.symbol");
|
|
target = stream->WriteStringMaybeAliased(1, _s, target);
|
|
}
|
|
|
|
// int32 quantity = 2;
|
|
if (this_._internal_quantity() != 0) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteInt32ToArrayWithField<2>(
|
|
stream, this_._internal_quantity(), target);
|
|
}
|
|
|
|
// double price = 3;
|
|
if (::absl::bit_cast<::uint64_t>(this_._internal_price()) != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(
|
|
3, this_._internal_price(), target);
|
|
}
|
|
|
|
// .trading.Side side = 4;
|
|
if (this_._internal_side() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
|
4, this_._internal_side(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:trading.Order)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t Order::ByteSizeLong(const MessageLite& base) {
|
|
const Order& this_ = static_cast<const Order&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t Order::ByteSizeLong() const {
|
|
const Order& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:trading.Order)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
::_pbi::Prefetch5LinesFrom7Lines(&this_);
|
|
{
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_symbol());
|
|
}
|
|
// double price = 3;
|
|
if (::absl::bit_cast<::uint64_t>(this_._internal_price()) != 0) {
|
|
total_size += 9;
|
|
}
|
|
// int32 quantity = 2;
|
|
if (this_._internal_quantity() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
|
this_._internal_quantity());
|
|
}
|
|
// .trading.Side side = 4;
|
|
if (this_._internal_side() != 0) {
|
|
total_size += 1 +
|
|
::_pbi::WireFormatLite::EnumSize(this_._internal_side());
|
|
}
|
|
}
|
|
return this_.MaybeComputeUnknownFieldsSize(total_size,
|
|
&this_._impl_._cached_size_);
|
|
}
|
|
|
|
void Order::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this = static_cast<Order*>(&to_msg);
|
|
auto& from = static_cast<const Order&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:trading.Order)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_symbol().empty()) {
|
|
_this->_internal_set_symbol(from._internal_symbol());
|
|
}
|
|
if (::absl::bit_cast<::uint64_t>(from._internal_price()) != 0) {
|
|
_this->_impl_.price_ = from._impl_.price_;
|
|
}
|
|
if (from._internal_quantity() != 0) {
|
|
_this->_impl_.quantity_ = from._impl_.quantity_;
|
|
}
|
|
if (from._internal_side() != 0) {
|
|
_this->_impl_.side_ = from._impl_.side_;
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Order::CopyFrom(const Order& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:trading.Order)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void Order::InternalSwap(Order* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.symbol_, &other->_impl_.symbol_, arena);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Order, _impl_.side_)
|
|
+ sizeof(Order::_impl_.side_)
|
|
- PROTOBUF_FIELD_OFFSET(Order, _impl_.price_)>(
|
|
reinterpret_cast<char*>(&_impl_.price_),
|
|
reinterpret_cast<char*>(&other->_impl_.price_));
|
|
}
|
|
|
|
::google::protobuf::Metadata Order::GetMetadata() const {
|
|
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
|
|
}
|
|
// ===================================================================
|
|
|
|
class OrderAck::_Internal {
|
|
public:
|
|
};
|
|
|
|
OrderAck::OrderAck(::google::protobuf::Arena* arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:trading.OrderAck)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE OrderAck::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from, const ::trading::OrderAck& from_msg)
|
|
: message_(arena, from.message_),
|
|
_cached_size_{0} {}
|
|
|
|
OrderAck::OrderAck(
|
|
::google::protobuf::Arena* arena,
|
|
const OrderAck& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
OrderAck* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
_impl_.success_ = from._impl_.success_;
|
|
|
|
// @@protoc_insertion_point(copy_constructor:trading.OrderAck)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE OrderAck::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: message_(arena),
|
|
_cached_size_{0} {}
|
|
|
|
inline void OrderAck::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
_impl_.success_ = {};
|
|
}
|
|
OrderAck::~OrderAck() {
|
|
// @@protoc_insertion_point(destructor:trading.OrderAck)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void OrderAck::SharedDtor(MessageLite& self) {
|
|
OrderAck& this_ = static_cast<OrderAck&>(self);
|
|
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.message_.Destroy();
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* OrderAck::PlacementNew_(const void*, void* mem,
|
|
::google::protobuf::Arena* arena) {
|
|
return ::new (mem) OrderAck(arena);
|
|
}
|
|
constexpr auto OrderAck::InternalNewImpl_() {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OrderAck),
|
|
alignof(OrderAck));
|
|
}
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataFull OrderAck::_class_data_ = {
|
|
::google::protobuf::internal::ClassData{
|
|
&_OrderAck_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&OrderAck::MergeImpl,
|
|
::google::protobuf::Message::GetNewImpl<OrderAck>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&OrderAck::SharedDtor,
|
|
::google::protobuf::Message::GetClearImpl<OrderAck>(), &OrderAck::ByteSizeLong,
|
|
&OrderAck::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(OrderAck, _impl_._cached_size_),
|
|
false,
|
|
},
|
|
&OrderAck::kDescriptorMethods,
|
|
&descriptor_table_trading_2eproto,
|
|
nullptr, // tracker
|
|
};
|
|
const ::google::protobuf::internal::ClassData* OrderAck::GetClassData() const {
|
|
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
|
|
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
|
|
return _class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<1, 2, 0, 32, 2> OrderAck::_table_ = {
|
|
{
|
|
0, // no _has_bits_
|
|
0, // no _extensions_
|
|
2, 8, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967292, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
2, // num_field_entries
|
|
0, // num_aux_entries
|
|
offsetof(decltype(_table_), field_names), // no aux_entries
|
|
_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::trading::OrderAck>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
// string message = 2;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{18, 63, 0, PROTOBUF_FIELD_OFFSET(OrderAck, _impl_.message_)}},
|
|
// bool success = 1;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(OrderAck, _impl_.success_), 63>(),
|
|
{8, 63, 0, PROTOBUF_FIELD_OFFSET(OrderAck, _impl_.success_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// bool success = 1;
|
|
{PROTOBUF_FIELD_OFFSET(OrderAck, _impl_.success_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kBool)},
|
|
// string message = 2;
|
|
{PROTOBUF_FIELD_OFFSET(OrderAck, _impl_.message_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
}},
|
|
// no aux_entries
|
|
{{
|
|
"\20\0\7\0\0\0\0\0"
|
|
"trading.OrderAck"
|
|
"message"
|
|
}},
|
|
};
|
|
|
|
PROTOBUF_NOINLINE void OrderAck::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:trading.OrderAck)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.message_.ClearToEmpty();
|
|
_impl_.success_ = false;
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* OrderAck::_InternalSerialize(
|
|
const MessageLite& base, ::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) {
|
|
const OrderAck& this_ = static_cast<const OrderAck&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* OrderAck::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
const OrderAck& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(serialize_to_array_start:trading.OrderAck)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
// bool success = 1;
|
|
if (this_._internal_success() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(
|
|
1, this_._internal_success(), target);
|
|
}
|
|
|
|
// string message = 2;
|
|
if (!this_._internal_message().empty()) {
|
|
const std::string& _s = this_._internal_message();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "trading.OrderAck.message");
|
|
target = stream->WriteStringMaybeAliased(2, _s, target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:trading.OrderAck)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t OrderAck::ByteSizeLong(const MessageLite& base) {
|
|
const OrderAck& this_ = static_cast<const OrderAck&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t OrderAck::ByteSizeLong() const {
|
|
const OrderAck& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:trading.OrderAck)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
::_pbi::Prefetch5LinesFrom7Lines(&this_);
|
|
{
|
|
// string message = 2;
|
|
if (!this_._internal_message().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_message());
|
|
}
|
|
// bool success = 1;
|
|
if (this_._internal_success() != 0) {
|
|
total_size += 2;
|
|
}
|
|
}
|
|
return this_.MaybeComputeUnknownFieldsSize(total_size,
|
|
&this_._impl_._cached_size_);
|
|
}
|
|
|
|
void OrderAck::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this = static_cast<OrderAck*>(&to_msg);
|
|
auto& from = static_cast<const OrderAck&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:trading.OrderAck)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_message().empty()) {
|
|
_this->_internal_set_message(from._internal_message());
|
|
}
|
|
if (from._internal_success() != 0) {
|
|
_this->_impl_.success_ = from._impl_.success_;
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void OrderAck::CopyFrom(const OrderAck& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:trading.OrderAck)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void OrderAck::InternalSwap(OrderAck* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, &other->_impl_.message_, arena);
|
|
swap(_impl_.success_, other->_impl_.success_);
|
|
}
|
|
|
|
::google::protobuf::Metadata OrderAck::GetMetadata() const {
|
|
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
|
|
}
|
|
// ===================================================================
|
|
|
|
class MarketRequest::_Internal {
|
|
public:
|
|
};
|
|
|
|
MarketRequest::MarketRequest(::google::protobuf::Arena* arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:trading.MarketRequest)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE MarketRequest::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from, const ::trading::MarketRequest& from_msg)
|
|
: symbol_(arena, from.symbol_),
|
|
_cached_size_{0} {}
|
|
|
|
MarketRequest::MarketRequest(
|
|
::google::protobuf::Arena* arena,
|
|
const MarketRequest& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
MarketRequest* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
|
|
// @@protoc_insertion_point(copy_constructor:trading.MarketRequest)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE MarketRequest::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: symbol_(arena),
|
|
_cached_size_{0} {}
|
|
|
|
inline void MarketRequest::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
}
|
|
MarketRequest::~MarketRequest() {
|
|
// @@protoc_insertion_point(destructor:trading.MarketRequest)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void MarketRequest::SharedDtor(MessageLite& self) {
|
|
MarketRequest& this_ = static_cast<MarketRequest&>(self);
|
|
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.symbol_.Destroy();
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* MarketRequest::PlacementNew_(const void*, void* mem,
|
|
::google::protobuf::Arena* arena) {
|
|
return ::new (mem) MarketRequest(arena);
|
|
}
|
|
constexpr auto MarketRequest::InternalNewImpl_() {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MarketRequest),
|
|
alignof(MarketRequest));
|
|
}
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataFull MarketRequest::_class_data_ = {
|
|
::google::protobuf::internal::ClassData{
|
|
&_MarketRequest_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&MarketRequest::MergeImpl,
|
|
::google::protobuf::Message::GetNewImpl<MarketRequest>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&MarketRequest::SharedDtor,
|
|
::google::protobuf::Message::GetClearImpl<MarketRequest>(), &MarketRequest::ByteSizeLong,
|
|
&MarketRequest::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(MarketRequest, _impl_._cached_size_),
|
|
false,
|
|
},
|
|
&MarketRequest::kDescriptorMethods,
|
|
&descriptor_table_trading_2eproto,
|
|
nullptr, // tracker
|
|
};
|
|
const ::google::protobuf::internal::ClassData* MarketRequest::GetClassData() const {
|
|
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
|
|
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
|
|
return _class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<0, 1, 0, 36, 2> MarketRequest::_table_ = {
|
|
{
|
|
0, // no _has_bits_
|
|
0, // no _extensions_
|
|
1, 0, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967294, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
1, // num_field_entries
|
|
0, // num_aux_entries
|
|
offsetof(decltype(_table_), field_names), // no aux_entries
|
|
_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::trading::MarketRequest>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
// string symbol = 1;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{10, 63, 0, PROTOBUF_FIELD_OFFSET(MarketRequest, _impl_.symbol_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// string symbol = 1;
|
|
{PROTOBUF_FIELD_OFFSET(MarketRequest, _impl_.symbol_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
}},
|
|
// no aux_entries
|
|
{{
|
|
"\25\6\0\0\0\0\0\0"
|
|
"trading.MarketRequest"
|
|
"symbol"
|
|
}},
|
|
};
|
|
|
|
PROTOBUF_NOINLINE void MarketRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:trading.MarketRequest)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.symbol_.ClearToEmpty();
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* MarketRequest::_InternalSerialize(
|
|
const MessageLite& base, ::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) {
|
|
const MarketRequest& this_ = static_cast<const MarketRequest&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* MarketRequest::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
const MarketRequest& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(serialize_to_array_start:trading.MarketRequest)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
const std::string& _s = this_._internal_symbol();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "trading.MarketRequest.symbol");
|
|
target = stream->WriteStringMaybeAliased(1, _s, target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:trading.MarketRequest)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t MarketRequest::ByteSizeLong(const MessageLite& base) {
|
|
const MarketRequest& this_ = static_cast<const MarketRequest&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t MarketRequest::ByteSizeLong() const {
|
|
const MarketRequest& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:trading.MarketRequest)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
{
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_symbol());
|
|
}
|
|
}
|
|
return this_.MaybeComputeUnknownFieldsSize(total_size,
|
|
&this_._impl_._cached_size_);
|
|
}
|
|
|
|
void MarketRequest::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this = static_cast<MarketRequest*>(&to_msg);
|
|
auto& from = static_cast<const MarketRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:trading.MarketRequest)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_symbol().empty()) {
|
|
_this->_internal_set_symbol(from._internal_symbol());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void MarketRequest::CopyFrom(const MarketRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:trading.MarketRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void MarketRequest::InternalSwap(MarketRequest* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.symbol_, &other->_impl_.symbol_, arena);
|
|
}
|
|
|
|
::google::protobuf::Metadata MarketRequest::GetMetadata() const {
|
|
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
|
|
}
|
|
// ===================================================================
|
|
|
|
class MarketData::_Internal {
|
|
public:
|
|
};
|
|
|
|
MarketData::MarketData(::google::protobuf::Arena* arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:trading.MarketData)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE MarketData::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from, const ::trading::MarketData& from_msg)
|
|
: symbol_(arena, from.symbol_),
|
|
_cached_size_{0} {}
|
|
|
|
MarketData::MarketData(
|
|
::google::protobuf::Arena* arena,
|
|
const MarketData& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::Message(arena, _class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::Message(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
MarketData* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
::memcpy(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, price_),
|
|
reinterpret_cast<const char *>(&from._impl_) +
|
|
offsetof(Impl_, price_),
|
|
offsetof(Impl_, timestamp_) -
|
|
offsetof(Impl_, price_) +
|
|
sizeof(Impl_::timestamp_));
|
|
|
|
// @@protoc_insertion_point(copy_constructor:trading.MarketData)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE MarketData::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: symbol_(arena),
|
|
_cached_size_{0} {}
|
|
|
|
inline void MarketData::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
::memset(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, price_),
|
|
0,
|
|
offsetof(Impl_, timestamp_) -
|
|
offsetof(Impl_, price_) +
|
|
sizeof(Impl_::timestamp_));
|
|
}
|
|
MarketData::~MarketData() {
|
|
// @@protoc_insertion_point(destructor:trading.MarketData)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void MarketData::SharedDtor(MessageLite& self) {
|
|
MarketData& this_ = static_cast<MarketData&>(self);
|
|
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.symbol_.Destroy();
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* MarketData::PlacementNew_(const void*, void* mem,
|
|
::google::protobuf::Arena* arena) {
|
|
return ::new (mem) MarketData(arena);
|
|
}
|
|
constexpr auto MarketData::InternalNewImpl_() {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(MarketData),
|
|
alignof(MarketData));
|
|
}
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataFull MarketData::_class_data_ = {
|
|
::google::protobuf::internal::ClassData{
|
|
&_MarketData_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&MarketData::MergeImpl,
|
|
::google::protobuf::Message::GetNewImpl<MarketData>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&MarketData::SharedDtor,
|
|
::google::protobuf::Message::GetClearImpl<MarketData>(), &MarketData::ByteSizeLong,
|
|
&MarketData::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(MarketData, _impl_._cached_size_),
|
|
false,
|
|
},
|
|
&MarketData::kDescriptorMethods,
|
|
&descriptor_table_trading_2eproto,
|
|
nullptr, // tracker
|
|
};
|
|
const ::google::protobuf::internal::ClassData* MarketData::GetClassData() const {
|
|
::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
|
|
::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
|
|
return _class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<2, 3, 0, 33, 2> MarketData::_table_ = {
|
|
{
|
|
0, // no _has_bits_
|
|
0, // no _extensions_
|
|
3, 24, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967288, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
3, // num_field_entries
|
|
0, // num_aux_entries
|
|
offsetof(decltype(_table_), field_names), // no aux_entries
|
|
_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::trading::MarketData>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// string symbol = 1;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{10, 63, 0, PROTOBUF_FIELD_OFFSET(MarketData, _impl_.symbol_)}},
|
|
// double price = 2;
|
|
{::_pbi::TcParser::FastF64S1,
|
|
{17, 63, 0, PROTOBUF_FIELD_OFFSET(MarketData, _impl_.price_)}},
|
|
// int64 timestamp = 3;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(MarketData, _impl_.timestamp_), 63>(),
|
|
{24, 63, 0, PROTOBUF_FIELD_OFFSET(MarketData, _impl_.timestamp_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// string symbol = 1;
|
|
{PROTOBUF_FIELD_OFFSET(MarketData, _impl_.symbol_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// double price = 2;
|
|
{PROTOBUF_FIELD_OFFSET(MarketData, _impl_.price_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kDouble)},
|
|
// int64 timestamp = 3;
|
|
{PROTOBUF_FIELD_OFFSET(MarketData, _impl_.timestamp_), 0, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kInt64)},
|
|
}},
|
|
// no aux_entries
|
|
{{
|
|
"\22\6\0\0\0\0\0\0"
|
|
"trading.MarketData"
|
|
"symbol"
|
|
}},
|
|
};
|
|
|
|
PROTOBUF_NOINLINE void MarketData::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:trading.MarketData)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.symbol_.ClearToEmpty();
|
|
::memset(&_impl_.price_, 0, static_cast<::size_t>(
|
|
reinterpret_cast<char*>(&_impl_.timestamp_) -
|
|
reinterpret_cast<char*>(&_impl_.price_)) + sizeof(_impl_.timestamp_));
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* MarketData::_InternalSerialize(
|
|
const MessageLite& base, ::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) {
|
|
const MarketData& this_ = static_cast<const MarketData&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* MarketData::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
const MarketData& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(serialize_to_array_start:trading.MarketData)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
const std::string& _s = this_._internal_symbol();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "trading.MarketData.symbol");
|
|
target = stream->WriteStringMaybeAliased(1, _s, target);
|
|
}
|
|
|
|
// double price = 2;
|
|
if (::absl::bit_cast<::uint64_t>(this_._internal_price()) != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(
|
|
2, this_._internal_price(), target);
|
|
}
|
|
|
|
// int64 timestamp = 3;
|
|
if (this_._internal_timestamp() != 0) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteInt64ToArrayWithField<3>(
|
|
stream, this_._internal_timestamp(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:trading.MarketData)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t MarketData::ByteSizeLong(const MessageLite& base) {
|
|
const MarketData& this_ = static_cast<const MarketData&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t MarketData::ByteSizeLong() const {
|
|
const MarketData& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:trading.MarketData)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
::_pbi::Prefetch5LinesFrom7Lines(&this_);
|
|
{
|
|
// string symbol = 1;
|
|
if (!this_._internal_symbol().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_symbol());
|
|
}
|
|
// double price = 2;
|
|
if (::absl::bit_cast<::uint64_t>(this_._internal_price()) != 0) {
|
|
total_size += 9;
|
|
}
|
|
// int64 timestamp = 3;
|
|
if (this_._internal_timestamp() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
|
|
this_._internal_timestamp());
|
|
}
|
|
}
|
|
return this_.MaybeComputeUnknownFieldsSize(total_size,
|
|
&this_._impl_._cached_size_);
|
|
}
|
|
|
|
void MarketData::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this = static_cast<MarketData*>(&to_msg);
|
|
auto& from = static_cast<const MarketData&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:trading.MarketData)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_symbol().empty()) {
|
|
_this->_internal_set_symbol(from._internal_symbol());
|
|
}
|
|
if (::absl::bit_cast<::uint64_t>(from._internal_price()) != 0) {
|
|
_this->_impl_.price_ = from._impl_.price_;
|
|
}
|
|
if (from._internal_timestamp() != 0) {
|
|
_this->_impl_.timestamp_ = from._impl_.timestamp_;
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void MarketData::CopyFrom(const MarketData& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:trading.MarketData)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void MarketData::InternalSwap(MarketData* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.symbol_, &other->_impl_.symbol_, arena);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(MarketData, _impl_.timestamp_)
|
|
+ sizeof(MarketData::_impl_.timestamp_)
|
|
- PROTOBUF_FIELD_OFFSET(MarketData, _impl_.price_)>(
|
|
reinterpret_cast<char*>(&_impl_.price_),
|
|
reinterpret_cast<char*>(&other->_impl_.price_));
|
|
}
|
|
|
|
::google::protobuf::Metadata MarketData::GetMetadata() const {
|
|
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
|
|
}
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace trading
|
|
namespace google {
|
|
namespace protobuf {
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
// @@protoc_insertion_point(global_scope)
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
|
|
_static_init2_ PROTOBUF_UNUSED =
|
|
(::_pbi::AddDescriptors(&descriptor_table_trading_2eproto),
|
|
::std::false_type{});
|
|
#include "google/protobuf/port_undef.inc"
|